mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-27 15:54:17 +02:00
Fix breaking of the cloned file status after Notepad++ restart
Fix #16412, close #16440
This commit is contained in:
parent
b324a68bc6
commit
a449c5e804
@ -2552,7 +2552,7 @@ bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode, const wch
|
|||||||
isWow64Off = true;
|
isWow64Off = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (doesFileExist(pFn))
|
if (doesFileExist(pFn) || (isSnapshotMode && doesFileExist(session._subViewFiles[k]._backupFilePath.c_str())))
|
||||||
{
|
{
|
||||||
//check if already open in main. If so, clone
|
//check if already open in main. If so, clone
|
||||||
BufferID clonedBuf = _mainDocTab.findBufferByName(pFn);
|
BufferID clonedBuf = _mainDocTab.findBufferByName(pFn);
|
||||||
@ -2569,10 +2569,6 @@ bool Notepad_plus::loadSession(Session & session, bool isSnapshotMode, const wch
|
|||||||
lastOpened = doOpen(pFn, false, false, session._subViewFiles[k]._encoding);
|
lastOpened = doOpen(pFn, false, false, session._subViewFiles[k]._encoding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isSnapshotMode && doesFileExist(session._subViewFiles[k]._backupFilePath.c_str()))
|
|
||||||
{
|
|
||||||
lastOpened = doOpen(pFn, false, false, session._subViewFiles[k]._encoding, session._subViewFiles[k]._backupFilePath.c_str(), session._subViewFiles[k]._originalFileLastModifTimestamp);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BufferID foundBufID = MainFileManager.getBufferFromName(pFn);
|
BufferID foundBufID = MainFileManager.getBufferFromName(pFn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user