mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
Lessen indentation by returning early if there's nothing to do.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35821 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b942b87e7d
commit
1edd77ca30
@ -3605,8 +3605,10 @@ Buffer::ReadStatus Buffer::readFromVC(FileName const & fn)
|
||||
Buffer::ReadStatus Buffer::readEmergency(FileName const & fn)
|
||||
{
|
||||
FileName const emergencyFile(fn.absFileName() + ".emergency");
|
||||
if (emergencyFile.exists()
|
||||
&& emergencyFile.lastModified() > fn.lastModified()) {
|
||||
if (!emergencyFile.exists()
|
||||
|| emergencyFile.lastModified() <= fn.lastModified())
|
||||
return ReadFileNotFound;
|
||||
|
||||
docstring const file = makeDisplayPath(fn.absFileName(), 20);
|
||||
docstring const text =
|
||||
bformat(_("An emergency save of the document "
|
||||
@ -3648,8 +3650,8 @@ Buffer::ReadStatus Buffer::readEmergency(FileName const & fn)
|
||||
default:
|
||||
return ReadCancel;
|
||||
}
|
||||
}
|
||||
return ReadFileNotFound;
|
||||
// suppress warning
|
||||
return ReadCancel;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user