diff options
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 6f91390e..fb9da9d7 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -144,11 +144,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 |