OSProcess.st
changeset 24018 8db2b5564d4b
parent 24011 c7b1d5bd2166
child 24290 36a25191f3e8
--- a/OSProcess.st	Thu Mar 28 16:18:40 2019 +0100
+++ b/OSProcess.st	Thu Mar 28 16:20:02 2019 +0100
@@ -264,19 +264,24 @@
 possiblyQuoted:aString
     "should we quote or escape?"
 
-    ^ String streamContents:[:s |
-        aString do:[:ch |
-            (ch isSeparator or:[ch = $\]) ifTrue:[
-                s nextPut:$\
-            ].
-            s nextPut:ch
-        ]
-    ]
+    "/ better quote - qorks on Windows AND Unix
+    ^ Filename possiblyQuotedPathname:aString.
+
+"/    ^ String streamContents:[:s |
+"/        aString do:[:ch |
+"/            (ch isSeparator or:[ch = $\]) ifTrue:[
+"/                s nextPut:$\
+"/            ].
+"/            s nextPut:ch
+"/        ]
+"/    ]
 
     "
      self possiblyQuoted:'foo bar' 
      self possiblyQuoted:'foo\bar'
     "
+
+    "Modified: / 28-03-2019 / 16:19:41 / Claus Gittinger"
 !
 
 programName:executableFile arguments:arrayOfStrings initialEnvironment:stringDictionary