Hello,

if <>x_Quote+$Path ends with a directory symbol,
double-quoting the string isn't enough,
the directory symbol is also an escape prefix,
so you have an open-ended escaped-double quote if that makes any sense.

for a more robust (that is, than just surrounding the string with double quotes)
way to escape parameters, this might be of help:

https://github.com/miyako/4d-component-sublaunch

---

C_TEXT($1;$0;$param)

If (Count parameters#0)

$param:=$1

C_LONGINT($platform;$i;$len)
PLATFORM PROPERTIES($platform)

If ($platform=Windows)

  //argument escape for cmd.exe; other commands (curl, ruby, etc.) may be 
incompatible

$shoudQuote:=False

$metacharacters:="&|<>()%^\" "

$len:=Length($metacharacters)

For ($i;1;$len)
$metacharacter:=Substring($metacharacters;$i;1)
$shoudQuote:=$shoudQuote | (Position($metacharacter;$param;*)#0)
If ($shoudQuote)
$i:=$len
End if
End for

If ($shoudQuote)
If (Substring($param;Length($param))="\\")
$param:="\""+$param+"\\\""
Else
$param:="\""+$param+"\""
End if
End if

Else

$metacharacters:="\\!\"#$%&'()=~|<>?;*`[] "

For ($i;1;Length($metacharacters))
$metacharacter:=Substring($metacharacters;$i;1)
$param:=Replace string($param;$metacharacter;"\\"+$metacharacter;*)
End for

End if

End if

$0:=$param



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to