hedgewars/uIO.pas
changeset 5130 3602ede67ec5
parent 4976 088d40d8aba2
child 5174 f5294509783e
--- a/hedgewars/uIO.pas	Sat Apr 09 15:54:28 2011 -0400
+++ b/hedgewars/uIO.pas	Sun Apr 10 20:24:25 2011 +0400
@@ -178,10 +178,12 @@
 
 // set RDNLY on file open
 filemode:= 0;
-
+{$I-}
 assign(f, fileName);
 reset(f, 1);
 
+tryDo(IOResult = 0, 'Error opening file ' + fileName, true);
+
 i:= 0; // avoid compiler hints
 buf[0]:= 0;
 repeat
@@ -199,6 +201,7 @@
 until i = 0;
 
 close(f)
+{$I+}
 end;
 
 procedure SendStat(sit: TStatInfoType; s: shortstring);