From 67f5cbb79ed33fdfd9debffe89db4607e61bc09e Mon Sep 17 00:00:00 2001 From: Don Ho Date: Wed, 3 Jul 2013 23:51:36 +0000 Subject: [PATCH] [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 --- .../src/WinControls/StaticDialog/RunDlg/RunDlg.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp index e00e01a8..cd52ffce 100644 --- a/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp +++ b/PowerEditor/src/WinControls/StaticDialog/RunDlg/RunDlg.cpp @@ -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; }