diff --git a/src/modules/filesystem/physfs/File.cpp b/src/modules/filesystem/physfs/File.cpp index fecd585f1..678b687fc 100644 --- a/src/modules/filesystem/physfs/File.cpp +++ b/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;