diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 782cbadd9c..a78e9e3467 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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. diff --git a/status.21x b/status.21x index b9cd145674..2e16f305bb 100644 --- a/status.21x +++ b/status.21x @@ -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