mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 12:39:29 +02:00
IDE: Try to switch path delimiters only for filenames when reading TCompilationToolOptions.Command. Issue #34476.
git-svn-id: trunk@59395 -
This commit is contained in:
parent
64a3cced51
commit
137181c237
@ -4274,10 +4274,27 @@ end;
|
||||
|
||||
procedure TCompilationToolOptions.LoadFromXMLConfig(XMLConfig: TXMLConfig;
|
||||
const Path: string; DoSwitchPathDelims: boolean);
|
||||
var
|
||||
ParamList: TStringList;
|
||||
Cmd, Param: String;
|
||||
i: Integer;
|
||||
begin
|
||||
//debugln(['TCompilationToolOptions.LoadFromXMLConfig ',Command,' Path=',Path,' DoSwitchPathDelims=',DoSwitchPathDelims]);
|
||||
Command:=SwitchPathDelims(XMLConfig.GetValue(Path+'Command/Value',''),
|
||||
DoSwitchPathDelims);
|
||||
Cmd:=XMLConfig.GetValue(Path+'Command/Value','');
|
||||
ParamList:=TStringList.Create;
|
||||
try
|
||||
SplitCmdLineParams(Cmd, ParamList);
|
||||
for i:=0 to ParamList.Count-1 do
|
||||
begin // Try to switch path delimiters only for filenames.
|
||||
Param:=ParamList[i]; // Example: "cmd /C \\server\path\executable.exe"
|
||||
if (Length(Param)<>2) or (Param[1]<>'/') then
|
||||
ParamList[i]:=SwitchPathDelims(Param,DoSwitchPathDelims);
|
||||
end;
|
||||
ParamList.Delimiter:=' ';
|
||||
Command:=ParamList.DelimitedText;
|
||||
finally
|
||||
ParamList.Free;
|
||||
end;
|
||||
LoadStringList(XMLConfig,Parsers,Path+'Parsers/');
|
||||
if Parsers.Count=0 then begin
|
||||
// read old format
|
||||
|
Loading…
Reference in New Issue
Block a user