summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-11-26 16:44:23 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-11-26 16:44:23 +0000
commit42f18ad42f3b908d6af849a74273a58840fa67a1 (patch)
tree40e3979cab1de064f012ee4c5c0b683da736be9d /src/resources
parentbcfa72e0341c911bf6c020765d1ffe16ccfb72e1 (diff)
downloadmana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.tar.gz
mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.tar.bz2
mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.tar.xz
mana-client-42f18ad42f3b908d6af849a74273a58840fa67a1.zip
Remove unnecessary check for file existance, loading will just fail with the correct error message.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/resourcemanager.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index f9a57e87..aabd1ccc 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -282,18 +282,13 @@ ResourceManager::deleteInstance()
void*
ResourceManager::loadFile(const std::string &fileName, int &fileSize)
{
- // If the file doesn't exist indicate failure
- if (!PHYSFS_exists(fileName.c_str())) {
- logger->log("Warning: %s not found!", fileName.c_str());
- return NULL;
- }
-
// Attempt to open the specified file using PhysicsFS
PHYSFS_file *file = PHYSFS_openRead(fileName.c_str());
// If the handler is an invalid pointer indicate failure
if (file == NULL) {
- logger->log("Warning: %s failed to load!", fileName.c_str());
+ logger->log("Warning: Failed to load %s: %s",
+ fileName.c_str(), PHYSFS_getLastError());
return NULL;
}