[BUG_FIXED] (Author: Andreas Jonsson) Fix Run dialog doesn't work with spaces in path.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1069 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-07-03 23:51:36 +00:00
parent 7898a2ff44
commit 67f5cbb79e

View File

@ -273,7 +273,18 @@ BOOL CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM)
fd.setExtFilter(TEXT("All files : "), TEXT(".*"), NULL);
if (const TCHAR *fn = fd.doOpenSingleFileDlg())
addTextToCombo(fn);
{
if(wcschr(fn, ' ') != NULL)
{
generic_string fn_quotes(fn);
fn_quotes = TEXT("\"") + fn_quotes + TEXT("\"");
addTextToCombo(fn_quotes.c_str());
}
else
{
addTextToCombo(fn);
}
}
return TRUE;
}