TWiki::Store::RcsFile::saveFile() writes to a specified file naively. So a file may have a partially written content if saveFile() is interrupted after it starts writing but before it completes writing. saveFile() should be atomic -- writing completely or not writing at all.
Description and Documentation
Instead of writing naively, writing to a temporary file and then renaming to the specified name makes saveFile() atomic.
More specifically, it will writie to a file name having ".PROCESS_ID" appended, and then it will rename to the specified file name.
-- Contributors: Hideyo Imazu - 2016-11-10
Yes, indeed, good proposal.
-- Peter Thoeny - 2016-11-17