Fix for buffed file open

This commit is contained in:
mysticbbs 2012-02-26 06:51:40 -05:00
parent de10a9193d
commit 4b6cfc8b31
1 changed files with 4 additions and 4 deletions

View File

@ -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;