mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 11:00:28 +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
|
if CfgFileExists(configpath+fn) then
|
||||||
foundfn:=configpath+fn
|
foundfn:=configpath+fn
|
||||||
else
|
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}
|
{$ifndef Unix}
|
||||||
if CfgFileExists(exepath+fn) then
|
if CfgFileExists(exepath+fn) then
|
||||||
foundfn:=exepath+fn
|
foundfn:=exepath+fn
|
||||||
|
Loading…
Reference in New Issue
Block a user