[NEW_FEATURE] Automatic Backup System (in progress).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1214 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-04-03 23:46:21 +00:00
parent db0489c8ed
commit c79f105597
2 changed files with 5 additions and 1 deletions

View File

@ -4270,10 +4270,14 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD
Buffer * buf = MainFileManager->getBufferByID(bufID);
if (buf->isUntitled() && buf->docLength() == 0)
continue;
if (!includUntitledDoc)
if (!PathFileExists(buf->getFullPathName()))
continue;
generic_string languageName = getLangFromMenu(buf);
const TCHAR *langName = languageName.c_str();
sessionFileInfo sfi(buf->getFullPathName(), langName, buf->getEncoding(), buf->getPosition(editView), buf->getBackupFileName().c_str(), int(buf->getLastModifiedTimestamp()));

View File

@ -1402,7 +1402,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
Session currentSession;
if (nppgui._rememberLastSession)
{
getCurrentOpenedFiles(currentSession);
getCurrentOpenedFiles(currentSession, true);
//Lock the recent file list so it isnt populated with opened files
//Causing them to show on restart even though they are loaded by session
_lastRecentFileList.setLock(true); //only lock when the session is remembered