From: Richard Heck Date: Sun, 17 May 2015 20:11:39 +0000 (-0400) Subject: Fix bug #9544: Mark file clean after we write it. X-Git-Tag: 2.2.0alpha1~778 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=61448d8cb2e922a9a891817a114c76c687be4811;p=features.git Fix bug #9544: Mark file clean after we write it. --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 5a47e78022..33805b870a 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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