]> git.lyx.org Git - features.git/commitdiff
Store the autosave file in the default document path as long as the document is ...
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 3 Apr 2009 20:07:43 +0000 (20:07 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 3 Apr 2009 20:07:43 +0000 (20:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29065 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp

index 888f82072882f8237aada52558df3516180e92a9..48474c5f344916a143248b8014880b5cb3db297a 100644 (file)
@@ -2436,12 +2436,11 @@ void Buffer::autoSave() const
        message(_("Autosaving current document..."));
 
        // create autosave filename
-       string fname = filePath();
-       fname += '#';
-       fname += d->filename.onlyFileName();
-       fname += '#';
+       string fpath = isUnnamed() ? lyxrc.document_path : filePath();
+       string fname = "#" + d->filename.onlyFileName() + "#";
+       FileName file_name = makeAbsPath(fname, fpath);
 
-       AutoSaveBuffer autosave(*this, FileName(fname));
+       AutoSaveBuffer autosave(*this, file_name);
        autosave.start();
 
        markBakClean();