From 7d765d531ee6601588ba4612b498428e699e3b1b Mon Sep 17 00:00:00 2001 From: James Hall Date: Tue, 2 Aug 2016 00:02:46 +0100 Subject: [PATCH] Fix space escaping in paths dragged onto the icon (#545) --- lib/actions/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/actions/ui.js b/lib/actions/ui.js index 50befc93..89abfd75 100644 --- a/lib/actions/ui.js +++ b/lib/actions/ui.js @@ -192,7 +192,7 @@ export function openFile (path) { // We need to use 'php-escape-shell' property this way // until this eslint issue will be fixed: // https://github.com/eslint/eslint/issues/6755 - let command = shellEscape.php_escapeshellcmd(path); + let command = shellEscape.php_escapeshellcmd(path).replace(/ /g, '\\ '); if (stats.isDirectory()) { command = `cd ${command}\n`; } else if (stats.isFile() && isExecutable(stats)) {