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

This commit is contained in:
rude
2009-08-25 22:22:55 +02:00
parent ab981ea982
commit 0fa37fc711
+1 -2
View File
@@ -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.