diff options
| author | Tannin <devnull@localhost> | 2015-04-12 15:45:34 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-04-12 15:45:34 +0200 |
| commit | 4b6e8ac51b9b903fc55e87fb3db0aff9b2fa03d0 (patch) | |
| tree | 294c24c0608afe98e7213725423e9ab35ac6f6ed /src/safewritefile.cpp | |
| parent | 8c2e88b9c90721557cef815696d5d0bf287420a0 (diff) | |
safe file writer now ignores the hash if the file doesn't exist
Diffstat (limited to 'src/safewritefile.cpp')
| -rw-r--r-- | src/safewritefile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/safewritefile.cpp b/src/safewritefile.cpp index 3bc1d1c4..007b3da9 100644 --- a/src/safewritefile.cpp +++ b/src/safewritefile.cpp @@ -50,7 +50,8 @@ void SafeWriteFile::commit() { bool SafeWriteFile::commitIfDifferent(QByteArray &inHash) {
QByteArray newHash = hash();
- if (newHash != inHash) {
+ if (newHash != inHash
+ || !QFile::exists(m_FileName)) {
commit();
inHash = newHash;
return true;
|
