mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-08 20:46:00 +02:00
* open config files read only so they can be open by multiple compilers at once
git-svn-id: trunk@23254 -
This commit is contained in:
parent
eaeb63f86d
commit
c9d8047113
@ -2102,6 +2102,7 @@ var
|
|||||||
line,
|
line,
|
||||||
level : longint;
|
level : longint;
|
||||||
option_read : boolean;
|
option_read : boolean;
|
||||||
|
oldfilemode : byte;
|
||||||
begin
|
begin
|
||||||
{ avoid infinite loop }
|
{ avoid infinite loop }
|
||||||
Inc(FileLevel);
|
Inc(FileLevel);
|
||||||
@ -2116,10 +2117,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
{ open file }
|
{ open file }
|
||||||
Message1(option_using_file,filename);
|
Message1(option_using_file,filename);
|
||||||
|
oldfilemode:=filemode;
|
||||||
|
filemode:=0;
|
||||||
assign(f,ExpandFileName(filename));
|
assign(f,ExpandFileName(filename));
|
||||||
{$push}{$I-}
|
{$push}{$I-}
|
||||||
reset(f);
|
reset(f);
|
||||||
{$pop}
|
{$pop}
|
||||||
|
filemode:=oldfilemode;
|
||||||
if ioresult<>0 then
|
if ioresult<>0 then
|
||||||
begin
|
begin
|
||||||
Message1(option_unable_open_file,filename);
|
Message1(option_unable_open_file,filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user