Fix bug #9544: Mark file clean after we write it.

(cherry picked from commit 61448d8cb2)

Conflicts:
	src/Buffer.cpp
This commit is contained in:
Richard Heck 2015-05-17 16:11:39 -04:00
parent 565d35ed58
commit 2f80c1ca33
2 changed files with 10 additions and 4 deletions

View File

@ -1287,10 +1287,14 @@ bool Buffer::save() const
// We don't need autosaves in the immediate future. (Asger)
resetAutosaveTimers();
// none of the backup activity that follows is necessary if the
// file does not exist
if (!fileName().exists())
return writeFile(fileName());
// if the file does not yet exist, none of the backup activity
// that follows is necessary
if (!fileName().exists()) {
if (!writeFile(fileName()))
return false;
markClean();
return true;
}
// this will hold the name of the location to which we backup
// the existing file, if we do that.

View File

@ -36,6 +36,8 @@ What's new
- Add Sweave and knitr importers (bug 8734).
- Correctly save files created from the command line (bug 9544).
* TEX2LYX IMPROVEMENTS