mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 05:33:33 +00:00
Fix bug #6525: Autosave error when renaming a new file.
Don't try to move the autosave file if it does not exist. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33454 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8918e5df37
commit
2a8fb9ae52
@ -3122,8 +3122,10 @@ void Buffer::removeAutosaveFile() const
|
||||
void Buffer::moveAutosaveFile(support::FileName const & oldauto) const
|
||||
{
|
||||
FileName const newauto = getAutosaveFilename();
|
||||
if (!(oldauto == newauto || oldauto.moveTo(newauto)))
|
||||
LYXERR0("Unable to remove autosave file `" << oldauto << "'!");
|
||||
oldauto.refresh();
|
||||
if (newauto != oldauto && oldauto.exists())
|
||||
if (!oldauto.moveTo(newauto)))
|
||||
LYXERR0("Unable to move autosave file `" << oldauto << "'!");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user