From 5aca3c65f869f46a8f26dab34eb3b33145b5b1a2 Mon Sep 17 00:00:00 2001 From: Almindor Date: Sun, 22 Oct 2006 21:43:37 +0000 Subject: [PATCH] * fixes #7534 git-svn-id: trunk@5008 - --- fcl/unix/process.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fcl/unix/process.inc b/fcl/unix/process.inc index b2365956af..32e06fc528 100644 --- a/fcl/unix/process.inc +++ b/fcl/unix/process.inc @@ -103,9 +103,14 @@ Procedure CommandToList(S : String; List : TStrings); end; inc(wend); end; + Result:=Copy(S,WStart,WEnd-WStart); - Result:=StringReplace(Result,'"','',[rfReplaceAll]); - Result:=StringReplace(Result,'''','',[rfReplaceAll]); + + if (Length(Result) > 0) + and (Result[1] = Result[Length(Result)]) // if 1st char = last char and.. + and (Result[1] in Literals) then // it's one of the literals, then + Result:=Copy(Result, 2, Length(Result) - 2); //delete the 2 (but not others in it) + While (WEnd<=Length(S)) and (S[Wend] in WhiteSpace) do inc(Wend); Delete(S,1,WEnd-1);