diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 55e0f72560..fb9fbcdb3e 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -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 << "'!"); }