diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-21 12:37:17 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-12-21 12:37:17 +0000 |
commit | 539af2ea0ce3245c41b4a4be989da35788f7b992 (patch) | |
tree | ad5ea5e00fa48ecc1e566a4e3d6278ca3a2efe1f /src/resources/resourcemanager.cpp | |
parent | 85361ea254cc764c31bfcf6b4cc1fb90cda48a85 (diff) | |
download | mana-539af2ea0ce3245c41b4a4be989da35788f7b992.tar.gz mana-539af2ea0ce3245c41b4a4be989da35788f7b992.tar.bz2 mana-539af2ea0ce3245c41b4a4be989da35788f7b992.tar.xz mana-539af2ea0ce3245c41b4a4be989da35788f7b992.zip |
Added logging of error on PHYSFS_addToSearchPath.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-rw-r--r-- | src/resources/resourcemanager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 3368d05b..658915d2 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -106,11 +106,15 @@ ResourceManager::setWriteDir(const std::string &path) return (bool) PHYSFS_setWriteDir(path.c_str()); } -void +bool ResourceManager::addToSearchPath(const std::string &path, bool append) { logger->log("Adding to PhysicsFS: %s", path.c_str()); - PHYSFS_addToSearchPath(path.c_str(), append ? 1 : 0); + if (!PHYSFS_addToSearchPath(path.c_str(), append ? 1 : 0)) { + logger->log("Error: %s", PHYSFS_getLastError()); + return false; + } + return true; } void |