]> git.lyx.org Git - features.git/commitdiff
Fix bug #9544: Mark file clean after we write it.
authorRichard Heck <rgheck@lyx.org>
Sun, 17 May 2015 20:11:39 +0000 (16:11 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 17 May 2015 20:12:47 +0000 (16:12 -0400)
src/Buffer.cpp

index 5a47e78022802249a950b1e3174ce81b3ee6f32b..33805b870a5ce12b1a3f20e1fabfb11c8cdc6f0a 100644 (file)
@@ -1336,8 +1336,12 @@ bool Buffer::save() const
 
        // if the file does not yet exist, none of the backup activity
        // that follows is necessary
-       if (!fileName().exists())
-               return writeFile(fileName());
+  if (!fileName().exists()) {
+               if (!writeFile(fileName()))
+      return false;
+    markClean();
+    return true;
+  }
 
        // we first write the file to a new name, then move it to its
        // proper location once that has been done successfully. that