mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 12:23:24 +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
 | 
			
		||||
var
 | 
			
		||||
  CommandLine: AnsiString;
 | 
			
		||||
  i : Integer;
 | 
			
		||||
  I: integer;
 | 
			
		||||
 | 
			
		||||
Begin
 | 
			
		||||
begin
 | 
			
		||||
  Commandline := '';
 | 
			
		||||
  For i:=0 to high(ComLine) Do
 | 
			
		||||
   Commandline:=CommandLine+' '+Comline[i];
 | 
			
		||||
  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;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
Procedure Sleep(Milliseconds : Cardinal);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -676,16 +676,20 @@ end;
 | 
			
		||||
 | 
			
		||||
function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer;
 | 
			
		||||
 | 
			
		||||
Var
 | 
			
		||||
var
 | 
			
		||||
  CommandLine: AnsiString;
 | 
			
		||||
  i : Integer;
 | 
			
		||||
  I: integer;
 | 
			
		||||
 | 
			
		||||
Begin
 | 
			
		||||
begin
 | 
			
		||||
  Commandline := '';
 | 
			
		||||
  For i:=0 to high(ComLine) Do
 | 
			
		||||
   Commandline:=CommandLine+' '+Comline[i];
 | 
			
		||||
  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;
 | 
			
		||||
end;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Procedure Sleep(Milliseconds : Cardinal);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user