Browse Source

Handle PHYSFS_fileExists failing with empty strings on windows

Bart van Strien 14 years ago
parent
commit
610b89cd19
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/modules/filesystem/physfs/File.cpp

+ 2 - 2
src/modules/filesystem/physfs/File.cpp

@@ -110,8 +110,8 @@ namespace physfs
 	{
 		bool isOpen = (file != 0);
 
-		if(!isOpen)
-			open(READ);
+		if(!isOpen && !open(READ))
+			throw love::Exception("Could not read file %s.", filename.c_str());
 
 		int max = (int)PHYSFS_fileLength(file);
 		size = (size == ALL) ? max : size;