[NEW_FEATURE] Automatic Backup System (in progress).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1217 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
5512a9221c
commit
7ec6d51d8f
|
@ -223,8 +223,13 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin
|
|||
::MessageBoxA(NULL, dest, "", MB_OK);
|
||||
}
|
||||
|
||||
// Lauch backup task
|
||||
_notepad_plus_plus_core.launchDocumentBackupTask();
|
||||
bool doBackup = true;
|
||||
if (doBackup)
|
||||
{
|
||||
_notepad_plus_plus_core.checkModifiedDocument();
|
||||
// Lauch backup task
|
||||
_notepad_plus_plus_core.launchDocumentBackupTask();
|
||||
}
|
||||
}
|
||||
|
||||
bool Notepad_plus_Window::isDlgsMsg(MSG *msg, bool unicodeSupported) const
|
||||
|
|
|
@ -1404,7 +1404,7 @@ bool Notepad_plus::loadSession(Session & session, bool isBackupMode)
|
|||
if (session._mainViewFiles[i]._encoding != -1)
|
||||
buf->setEncoding(session._mainViewFiles[i]._encoding);
|
||||
|
||||
if (isBackupMode && session._mainViewFiles[i]._backupFilePath != TEXT(""))
|
||||
if (isBackupMode && session._mainViewFiles[i]._backupFilePath != TEXT("") && PathFileExists(session._mainViewFiles[i]._backupFilePath.c_str()))
|
||||
buf->setDirty(true);
|
||||
|
||||
//Force in the document so we can add the markers
|
||||
|
@ -1511,7 +1511,7 @@ bool Notepad_plus::loadSession(Session & session, bool isBackupMode)
|
|||
buf->setLangType(typeToSet, pLn);
|
||||
buf->setEncoding(session._subViewFiles[k]._encoding);
|
||||
|
||||
if (isBackupMode && session._mainViewFiles[i]._backupFilePath != TEXT(""))
|
||||
if (isBackupMode && session._subViewFiles[i]._backupFilePath != TEXT("") && PathFileExists(session._subViewFiles[i]._backupFilePath.c_str()))
|
||||
buf->setDirty(true);
|
||||
|
||||
//Force in the document so we can add the markers
|
||||
|
|
Loading…
Reference in New Issue