diff --git a/ide/lazarusmanager.pas b/ide/lazarusmanager.pas index 86c30472a7..744d7a6094 100644 --- a/ide/lazarusmanager.pas +++ b/ide/lazarusmanager.pas @@ -161,14 +161,12 @@ begin else FCmdLineParams.Add(Param); end; - // make sure that all the values of the command line parameters are still + // make sure that 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; + if pos(' ',FCmdLineParams[i])>0 then + FCmdLineParams[i] := '"' + FCmdLineParams[i] + '"'; end; end; diff --git a/ide/main.pp b/ide/main.pp index cc9f093101..e1f28455d7 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -9383,7 +9383,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;