summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-01 18:04:15 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-01 18:12:05 +0300
commit8a9cba471fe49fd73342ee0b7a898f29539edb20 (patch)
tree2aff23d4fdb0b356470c0baddb5a792fc567c560 /src
parentc56844f6f10fc12410b6554fbefe361bfd8630f6 (diff)
downloadmv-8a9cba471fe49fd73342ee0b7a898f29539edb20.tar.gz
mv-8a9cba471fe49fd73342ee0b7a898f29539edb20.tar.bz2
mv-8a9cba471fe49fd73342ee0b7a898f29539edb20.tar.xz
mv-8a9cba471fe49fd73342ee0b7a898f29539edb20.zip
Add logging info about mount / unmount in physfs.
Diffstat (limited to 'src')
-rw-r--r--src/fs/physfs/virtfsphys.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/fs/physfs/virtfsphys.cpp b/src/fs/physfs/virtfsphys.cpp
index 3cb044277..0d474b161 100644
--- a/src/fs/physfs/virtfsphys.cpp
+++ b/src/fs/physfs/virtfsphys.cpp
@@ -187,8 +187,14 @@ namespace VirtFsPhys
reportAlways("Called addDirToSearchPath with zip archive");
return false;
}
- return PHYSFS_addToSearchPath(newDir.c_str(),
+ const int ret = PHYSFS_addToSearchPath(newDir.c_str(),
append == Append_true ? 1 : 0);
+ if (ret == 0)
+ {
+ logger->log("addDirToSearchPath error: %s",
+ VirtFsPhys::getLastError());
+ }
+ return ret;
}
bool removeDirFromSearchPath(const std::string &restrict oldDir)
@@ -199,7 +205,13 @@ namespace VirtFsPhys
reportAlways("Called removeDirFromSearchPath with zip archive");
return false;
}
- return PHYSFS_removeFromSearchPath(oldDir.c_str());
+ const int ret = PHYSFS_removeFromSearchPath(oldDir.c_str());
+ if (ret == 0)
+ {
+ logger->log("removeDirFromSearchPath error: %s",
+ VirtFsPhys::getLastError());
+ }
+ return ret;
}
bool addZipToSearchPath(const std::string &restrict newDir,
@@ -211,8 +223,14 @@ namespace VirtFsPhys
reportAlways("Called addZipToSearchPath without zip archive");
return false;
}
- return PHYSFS_addToSearchPath(newDir.c_str(),
+ const int ret = PHYSFS_addToSearchPath(newDir.c_str(),
append == Append_true ? 1 : 0);
+ if (ret == 0)
+ {
+ logger->log("addZipToSearchPath error: %s",
+ VirtFsPhys::getLastError());
+ }
+ return ret;
}
bool removeZipFromSearchPath(const std::string &restrict oldDir)
@@ -223,7 +241,13 @@ namespace VirtFsPhys
reportAlways("Called removeZipFromSearchPath without zip archive");
return false;
}
- return PHYSFS_removeFromSearchPath(oldDir.c_str());
+ const int ret = PHYSFS_removeFromSearchPath(oldDir.c_str());
+ if (ret == 0)
+ {
+ logger->log("removeZipFromSearchPath error: %s",
+ VirtFsPhys::getLastError());
+ }
+ return ret;
}
std::string getRealDir(const std::string &restrict filename)