IDE, startlazarus: fixed passing primary config directory with spaces in name (bug #11245)

git-svn-id: trunk@15046 -
This commit is contained in:
vincents 2008-05-05 07:51:58 +00:00
parent 6cd01bc70a
commit b5783a87b1
2 changed files with 10 additions and 1 deletions

View File

@ -161,6 +161,15 @@ begin
else
FCmdLineParams.Add(Param);
end;
// make sure that all the values of the command line parameters are still
// double quoted, if they contain spaces
for i := 0 to FCmdLineParams.Count -1 do
begin
if pos(' ',FCmdLineParams.ValueFromIndex[i])>0 then
begin
FCmdLineParams.ValueFromIndex[i] := '"' + FCmdLineParams.ValueFromIndex[i] + '"';
end;
end;
end;
function TLazarusManager.GetCommandLineParameters: string;

View File

@ -9165,7 +9165,7 @@ procedure TMainIDE.DoRestart;
end;
StartLazProcess.CommandLine := ExeName
+' --lazarus-pid='+IntToStr(GetProcessID)
+' --primary-config-path='+GetPrimaryConfigPath;
+' --primary-config-path="'+GetPrimaryConfigPath+'"';
StartLazProcess.Execute;
finally
StartLazProcess.Free;