Handle PHYSFS_fileExists failing with empty strings on windows

This commit is contained in:
Bart van Strien
2011-02-20 01:00:27 +01:00
parent 18ca165718
commit 610b89cd19
+2 -2
View File
@@ -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;