summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/safewritefile.cpp3
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;