[NEW] Make the last current directory as current directory when the path of current document doesn't exist.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@324 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-09-16 20:37:38 +00:00
parent e58b8c2a2c
commit e85d8619ed

View File

@ -685,13 +685,7 @@ private:
if (params->getNppGUI()._saveOpenKeepInSameDir) if (params->getNppGUI()._saveOpenKeepInSameDir)
return; return;
if (!dir || !PathIsDirectory(dir)) if (dir && PathIsDirectory(dir))
{
//Non existing path, usually occurs when a new 1 file is open.
//Set working dir to Notepad++' directory to prevent directory lock.
params->setWorkingDir(NULL);
}
else
{ {
params->setWorkingDir(dir); params->setWorkingDir(dir);
} }