Support opening filenames with spaces in external editor in Windows, fixes #3883
This commit is contained in:
parent
e242afedd6
commit
408fc858e1
@ -324,7 +324,7 @@ bool ExtProgStore::openInCustomEditor (const Glib::ustring& fileName)
|
|||||||
#if defined WIN32
|
#if defined WIN32
|
||||||
|
|
||||||
const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\"");
|
const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\"");
|
||||||
auto success = ShellExecute( NULL, "open", cmdLine.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL );
|
auto success = ShellExecute( NULL, "open", cmdLine.c_str(), ('"' + fileName + '"').c_str(), NULL, SW_SHOWNORMAL );
|
||||||
return (uintptr_t)success > 32;
|
return (uintptr_t)success > 32;
|
||||||
|
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user