Win32OperatingSystem.st
changeset 22054 bb2019124bed
parent 21600 7f72334cd6a9
child 22111 66d61db0d982
equal deleted inserted replaced
22053:3309b9812005 22054:bb2019124bed
  3630     "/ ...this will change in an upcoming version to include
  3630     "/ ...this will change in an upcoming version to include
  3631     "/ cmd.exe command-line parsing here (sigh).
  3631     "/ cmd.exe command-line parsing here (sigh).
  3632 
  3632 
  3633     cmdName := (aCommandString ? '') withoutSeparators.
  3633     cmdName := (aCommandString ? '') withoutSeparators.
  3634 
  3634 
  3635     (cmdName isEmpty or:[cmdName includesAny:'<>|']) ifFalse:[
  3635     (cmdName isEmpty or:[cmdName includesAny:'<>|&']) ifFalse:[
  3636         "/ test whether the command is a plain executable;
  3636         "/ test whether the command is a plain executable;
  3637         "/ if so, no shell is required
  3637         "/ if so, no shell is required
  3638         |index file suffix|
  3638         |index file suffix|
  3639 
  3639 
  3640         index := cmdName indexOfSeparatorStartingAt:1.
  3640         cmdName first = $" ifTrue:[
       
  3641             index := cmdName indexOf:$" startingAt:2.
       
  3642         ] ifFalse:[
       
  3643             index := 1.
       
  3644         ].
       
  3645         index := cmdName indexOfSeparatorStartingAt:index.
  3641         index ~~ 0 ifTrue:[
  3646         index ~~ 0 ifTrue:[
  3642             cmdName := cmdName copyFrom:1 to:(index-1).
  3647             cmdName := cmdName copyFrom:1 to:(index-1).
  3643             args := cmdName copyFrom:(index+1).
  3648             args := cmdName copyFrom:(index+1).
  3644         ] ifFalse:[
  3649         ] ifFalse:[
  3645             args := ''.
  3650             args := ''.
  3690      self commandAndArgsForOSCommand:'diff.exe'
  3695      self commandAndArgsForOSCommand:'diff.exe'
  3691      self commandAndArgsForOSCommand:'dir/w'
  3696      self commandAndArgsForOSCommand:'dir/w'
  3692      self commandAndArgsForOSCommand:'diff >nul:'
  3697      self commandAndArgsForOSCommand:'diff >nul:'
  3693      self commandAndArgsForOSCommand:'diff /bla'
  3698      self commandAndArgsForOSCommand:'diff /bla'
  3694    "
  3699    "
       
  3700     "/ self commandAndArgsForOSCommand:'"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" /bla'
       
  3701     "/ self commandAndArgsForOSCommand:'"C:\Program Files (x86)\Mozilla Firefox\firefox" /bla'
       
  3702     "/ self commandAndArgsForOSCommand:'"command with spaces" /bla'
       
  3703 
  3695 
  3704 
  3696     "Modified: / 20-01-1998 / 16:57:19 / md"
  3705     "Modified: / 20-01-1998 / 16:57:19 / md"
  3697     "Modified: / 11-02-2007 / 20:51:08 / cg"
  3706     "Modified: / 11-02-2007 / 20:51:08 / cg"
  3698 !
  3707 !
  3699 
  3708