From 61448d8cb2e922a9a891817a114c76c687be4811 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 17 May 2015 16:11:39 -0400 Subject: [PATCH] Fix bug #9544: Mark file clean after we write it. --- src/Buffer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.2