IDE: pass IDEmake.cfg path as short file name, so quoting is needed (maybe fixes #11362)

git-svn-id: trunk@15279 -
This commit is contained in:
vincents 2008-05-30 22:04:59 +00:00
parent 35ede8b695
commit 5f98274e7f

View File

@ -545,9 +545,6 @@ begin
if (blfUseMakeIDECfg in Flags) then begin
MakeIDECfgFilename:=GetMakeIDEConfigFilename;
if (FileExists(MakeIDECfgFilename)) then begin
if pos(' ', MakeIDECfgFilename)>0 then
ExtraOptions:='@"'+MakeIDECfgFilename+'"'
else
ExtraOptions:='@'+MakeIDECfgFilename;
exit;
end;
@ -770,6 +767,18 @@ end;
function GetMakeIDEConfigFilename: string;
begin
Result:=AppendPathDelim(GetPrimaryConfigPath)+DefaultIDEMakeOptionFilename;
{$ifdef windows}
// If a file name contains spaces, a file name whould need to be quoted.
// Using a single quote is not possible, it is used already in the
// makefile to group all options in OPT='bla bla'.
// using " implicates that make uses a shell to execute the command of that
// line. But shells (i.e. command.com, cmd.exe, etc) are so fragile
// that is better to avoid this.
// Therefore we use a short 8.3 file and path name, so we don't need to use
// quotes at all
if pos(' ',Result)>0 then
Result:=ExtractShortPathName(Result);
{$endif}
end;
{ TConfigureBuildLazarusDlg }