Store the autosave file in the default document path as long as the document is 'unnamed'.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29065 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-04-03 20:07:43 +00:00
parent b0a22252c7
commit 4ec167330f

View 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();