Browse Source

Fixed bug where file was left open when doing a love.filesystem.read.

rude 16 years ago
parent
commit
0fa37fc711
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/modules/filesystem/physfs/Filesystem.cpp

+ 1 - 2
src/modules/filesystem/physfs/Filesystem.cpp

@@ -236,10 +236,9 @@ namespace physfs
 		{
 			// Create the file.
 			file = newFile(lua_tostring(L, 1));
-			file->open(File::READ);
 		}
 		else
-                        return luaL_error(L, "Expected filename.");
+			return luaL_error(L, "Expected filename.");
 
 		// Optionally, the caller can specify whether to read
 		// the whole file, or just a part of it.