mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Revert r29505. We forgot that we cannot retrieve the new autosavefile yet, because the buffer might still be marked as unnamed. So, we should first finish this administration, before we can get the location of the new autosave filename.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29506 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dce037ed5a
commit
11ecc24c0c
@ -491,17 +491,9 @@ void Buffer::setReadonly(bool const flag)
|
||||
|
||||
void Buffer::setFileName(string const & newfile)
|
||||
{
|
||||
// bring the autosave file with us, just in case.
|
||||
FileName const oldauto = getAutosaveFilename();
|
||||
d->filename = makeAbsPath(newfile);
|
||||
setReadonly(d->filename.isReadOnly());
|
||||
updateTitles();
|
||||
FileName const newauto = getAutosaveFilename();
|
||||
if (oldauto == newauto)
|
||||
return;
|
||||
if (oldauto.moveTo(newauto))
|
||||
return;
|
||||
LYXERR0("Unable to remove autosave file `" << oldauto << "'!");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user