[BUG_FIXED] Restore working directory with no open files.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@122 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
83fb8c749d
commit
4b0926a0d2
|
@ -841,6 +841,13 @@ private:
|
|||
|
||||
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.
|
||||
char nppDir[MAX_PATH];
|
||||
|
||||
//wParam set to max_path in case boundary checks will ever be made.
|
||||
SendMessage(_hSelf, NPPM_GETNPPDIRECTORY, (WPARAM)MAX_PATH, (LPARAM)nppDir);
|
||||
::SetCurrentDirectory(nppDir);
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -510,7 +510,7 @@ BEGIN
|
|||
CONTROL "",IDI_M30ICON,"Static",SS_OWNERDRAW,21,10,20,20
|
||||
END
|
||||
|
||||
IDD_GOLINE DIALOGEX 26, 41, 233, 88
|
||||
IDD_GOLINE DIALOGEX 26, 41, 261, 88
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE
|
||||
CAPTION "Go To..."
|
||||
|
@ -521,11 +521,11 @@ BEGIN
|
|||
LTEXT "You are here :",ID_URHERE_STATIC,5,34,95,8,NOT WS_GROUP
|
||||
LTEXT "0123456789",ID_CURRLINE,100,34,45,8,NOT WS_GROUP
|
||||
LTEXT "You want to go :",ID_UGO_STATIC,5,50,95,8
|
||||
EDITTEXT ID_GOLINE_EDIT,100,49,45,12,ES_NUMBER
|
||||
EDITTEXT ID_GOLINE_EDIT,100,49,71,12,ES_NUMBER
|
||||
LTEXT "You can't go further than :",ID_NOMORETHAN_STATIC,5,73,92,8,NOT WS_GROUP
|
||||
LTEXT "0123456789",ID_LASTLINE,99,73,45,8,NOT WS_GROUP
|
||||
DEFPUSHBUTTON "&Go !",IDOK,155,47,70,14,BS_NOTIFY
|
||||
PUSHBUTTON "I'm going nowhere",IDCANCEL,155,69,70,14,BS_NOTIFY
|
||||
DEFPUSHBUTTON "&Go !",IDOK,181,47,70,14,BS_NOTIFY
|
||||
PUSHBUTTON "I'm going nowhere",IDCANCEL,181,69,70,14,BS_NOTIFY
|
||||
END
|
||||
|
||||
IDD_VALUE_DLG DIALOGEX 0, 0, 74, 17
|
||||
|
|
Loading…
Reference in New Issue