mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 02:19:24 +02:00
+ on windows, search %ALLUSERSPROFILE% and %USERPROFILE% for fpc.cfg
git-svn-id: trunk@19927 -
This commit is contained in:
parent
930883edf6
commit
2dc2d65b1a
@ -2416,6 +2416,14 @@ begin
|
||||
if CfgFileExists(configpath+fn) then
|
||||
foundfn:=configpath+fn
|
||||
else
|
||||
{$ifdef WINDOWS}
|
||||
if (GetEnvironmentVariable('USERPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn) then
|
||||
foundfn:=FixPath(GetEnvironmentVariable('USERPROFILE'),false)+fn
|
||||
else
|
||||
if (GetEnvironmentVariable('ALLUSERSPROFILE')<>'') and CfgFileExists(FixPath(GetEnvironmentVariable('ALLUSERSPROFILE'),false)+fn) then
|
||||
foundfn:=FixPath(GetEnvironmentVariable('ALLUSERSPROFILE'),false)+fn
|
||||
else
|
||||
{$endif WINDOWS}
|
||||
{$ifndef Unix}
|
||||
if CfgFileExists(exepath+fn) then
|
||||
foundfn:=exepath+fn
|
||||
|
Loading…
Reference in New Issue
Block a user