Fix for buffed file open
This commit is contained in:
parent
de10a9193d
commit
4b6cfc8b31
|
@ -457,20 +457,20 @@ Begin
|
||||||
|
|
||||||
Case OM of
|
Case OM of
|
||||||
fmOpen : Begin
|
fmOpen : Begin
|
||||||
System.Reset(BufFile, 1);
|
{$I-} System.Reset(BufFile, 1); {$I+}
|
||||||
If System.IoResult <> 0 Then Exit;
|
If System.IoResult <> 0 Then Exit;
|
||||||
FillBuffer;
|
FillBuffer;
|
||||||
End;
|
End;
|
||||||
fmOpenCreate: Begin
|
fmOpenCreate: Begin
|
||||||
System.Reset(BufFile, 1);
|
{$I-} System.Reset(BufFile, 1); {$I+}
|
||||||
If System.IoResult <> 0 Then Begin
|
If System.IoResult <> 0 Then Begin
|
||||||
System.ReWrite(BufFile, 1);
|
{$I-} System.ReWrite(BufFile, 1); {$I+}
|
||||||
If System.IoResult <> 0 Then Exit;
|
If System.IoResult <> 0 Then Exit;
|
||||||
End Else
|
End Else
|
||||||
FillBuffer;
|
FillBuffer;
|
||||||
End;
|
End;
|
||||||
fmCreate : Begin
|
fmCreate : Begin
|
||||||
System.ReWrite(BufFile, 1);
|
{$I-} System.ReWrite(BufFile, 1); {$I+}
|
||||||
If IoResult <> 0 Then Exit;
|
If IoResult <> 0 Then Exit;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
Loading…
Reference in New Issue