--- a/Win32OperatingSystem.st Mon Jul 17 17:50:51 2017 +0200
+++ b/Win32OperatingSystem.st Tue Jul 18 10:19:14 2017 +0200
@@ -3632,12 +3632,17 @@
cmdName := (aCommandString ? '') withoutSeparators.
- (cmdName isEmpty or:[cmdName includesAny:'<>|']) ifFalse:[
+ (cmdName isEmpty or:[cmdName includesAny:'<>|&']) ifFalse:[
"/ test whether the command is a plain executable;
"/ if so, no shell is required
|index file suffix|
- index := cmdName indexOfSeparatorStartingAt:1.
+ cmdName first = $" ifTrue:[
+ index := cmdName indexOf:$" startingAt:2.
+ ] ifFalse:[
+ index := 1.
+ ].
+ index := cmdName indexOfSeparatorStartingAt:index.
index ~~ 0 ifTrue:[
cmdName := cmdName copyFrom:1 to:(index-1).
args := cmdName copyFrom:(index+1).
@@ -3692,6 +3697,10 @@
self commandAndArgsForOSCommand:'diff >nul:'
self commandAndArgsForOSCommand:'diff /bla'
"
+ "/ self commandAndArgsForOSCommand:'"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" /bla'
+ "/ self commandAndArgsForOSCommand:'"C:\Program Files (x86)\Mozilla Firefox\firefox" /bla'
+ "/ self commandAndArgsForOSCommand:'"command with spaces" /bla'
+
"Modified: / 20-01-1998 / 16:57:19 / md"
"Modified: / 11-02-2007 / 20:51:08 / cg"