mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:29:25 +02:00
* open html properly on read only file systems, resolves #10015
git-svn-id: trunk@8975 -
This commit is contained in:
parent
c3475dddc0
commit
036744bc16
@ -200,12 +200,16 @@ constructor TDOSTextFile.Init(AFileName: string);
|
||||
var f: file;
|
||||
linecomplete,hasCR: boolean;
|
||||
S: string;
|
||||
OldFMode : Integer;
|
||||
begin
|
||||
inherited Init;
|
||||
if AFileName='' then Fail;
|
||||
{$I-}
|
||||
Assign(f,AFileName);
|
||||
OldFMode:= FileMode;
|
||||
FileMode:= 0;
|
||||
Reset(f,1);
|
||||
FileMode:= OldFMode;
|
||||
if IOResult<>0 then Fail;
|
||||
DosFileName:=AFileName;
|
||||
Dispose(Lines,Done);
|
||||
|
@ -867,7 +867,7 @@ begin
|
||||
exists PM }
|
||||
src:=DirAndNameOf(src)+'.ans';
|
||||
{$ifdef DEBUG}
|
||||
DebugMessage(GetFileName,' Trying "'+Src+'"',Line,1);
|
||||
DebugMessage(GetFileName,' Trying "'+Src+'"',Line,1);
|
||||
{$endif DEBUG}
|
||||
if not ExistsFile(src) then
|
||||
begin
|
||||
@ -1443,7 +1443,7 @@ begin
|
||||
if Name<>'' then
|
||||
HTMLFile:=New(PDOSTextFile, Init(Name));
|
||||
|
||||
if (HTMLFile=nil)and (CurFileName<>'') then
|
||||
if (HTMLFile=nil) and (CurFileName<>'') then
|
||||
begin
|
||||
Name:=CurFileName;
|
||||
HTMLFile:=New(PDOSTextFile, Init(Name));
|
||||
|
Loading…
Reference in New Issue
Block a user