refs #782 CAtomicFile on Windows: flush buffer before attempting to rename,

and use ReplaceFile to rename if target already exists.
This commit is contained in:
Mathew Sutcliffe
2016-11-04 01:24:19 +00:00
committed by Klaus Basan
parent 52cd84dd99
commit 5035e7b5fb
2 changed files with 12 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ namespace BlackMisc
* when it is closed, so that it overwrites the target file as a single, atomic transaction.
*
* If the application crashes while data is still being written, the original file is unchanged.
*
* \fixme Consider using QSaveFile.
*/
class BLACKMISC_EXPORT CAtomicFile : public QFile
{