mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-19 04:49:29 +01:00
* quote parameters with spaces
git-svn-id: trunk@10111 -
This commit is contained in:
parent
eb00f047f3
commit
69363bad5e
@ -866,16 +866,19 @@ end;
|
||||
|
||||
function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer;
|
||||
|
||||
Var
|
||||
CommandLine : AnsiString;
|
||||
i : Integer;
|
||||
var
|
||||
CommandLine: AnsiString;
|
||||
I: integer;
|
||||
|
||||
Begin
|
||||
Commandline:='';
|
||||
For i:=0 to high(ComLine) Do
|
||||
Commandline:=CommandLine+' '+Comline[i];
|
||||
ExecuteProcess:=ExecuteProcess(Path,CommandLine);
|
||||
End;
|
||||
begin
|
||||
Commandline := '';
|
||||
for I := 0 to High (ComLine) do
|
||||
if Pos (' ', ComLine [I]) <> 0 then
|
||||
CommandLine := CommandLine + ' ' + '"' + ComLine [I] + '"'
|
||||
else
|
||||
CommandLine := CommandLine + ' ' + Comline [I];
|
||||
ExecuteProcess := ExecuteProcess (Path, CommandLine);
|
||||
end;
|
||||
|
||||
Procedure Sleep(Milliseconds : Cardinal);
|
||||
|
||||
|
||||
@ -676,16 +676,20 @@ end;
|
||||
|
||||
function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer;
|
||||
|
||||
Var
|
||||
CommandLine : AnsiString;
|
||||
i : Integer;
|
||||
var
|
||||
CommandLine: AnsiString;
|
||||
I: integer;
|
||||
|
||||
begin
|
||||
Commandline := '';
|
||||
for I := 0 to High (ComLine) do
|
||||
if Pos (' ', ComLine [I]) <> 0 then
|
||||
CommandLine := CommandLine + ' ' + '"' + ComLine [I] + '"'
|
||||
else
|
||||
CommandLine := CommandLine + ' ' + Comline [I];
|
||||
ExecuteProcess := ExecuteProcess (Path, CommandLine);
|
||||
end;
|
||||
|
||||
Begin
|
||||
Commandline:='';
|
||||
For i:=0 to high(ComLine) Do
|
||||
Commandline:=CommandLine+' '+Comline[i];
|
||||
ExecuteProcess:=ExecuteProcess(Path,CommandLine);
|
||||
End;
|
||||
|
||||
Procedure Sleep(Milliseconds : Cardinal);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user