summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfs.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-01 04:50:26 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-01 04:50:26 +0300
commit7df01a8695e46e7e8cce603782f0e16caf54169b (patch)
tree030a0125429c9605c24ad74e3d523fd900f155cd /src/fs/virtfs/virtfs.cpp
parent0f172abb004bed203f8bf329e4f43eb174a8a58c (diff)
downloadmanaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.gz
manaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.bz2
manaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.tar.xz
manaverse-7df01a8695e46e7e8cce603782f0e16caf54169b.zip
Fix tests running without physfs.
Diffstat (limited to 'src/fs/virtfs/virtfs.cpp')
-rw-r--r--src/fs/virtfs/virtfs.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfs.cpp b/src/fs/virtfs/virtfs.cpp
index 3d223ccba..f9fcdcf8b 100644
--- a/src/fs/virtfs/virtfs.cpp
+++ b/src/fs/virtfs/virtfs.cpp
@@ -144,23 +144,41 @@ namespace VirtFs
bool addDirToSearchPath(const std::string &restrict newDir,
const Append append)
{
+#ifdef UNITTESTS
+ return VirtFsDir::addToSearchPathSilent(newDir,
+ append,
+ SkipError_false);
+#else // UNITTESTS
return VirtFsDir::addToSearchPath(newDir, append);
+#endif // UNITTESTS
}
bool removeDirFromSearchPath(const std::string &restrict oldDir)
{
+#ifdef UNITTESTS
+ return VirtFsDir::removeFromSearchPathSilent(oldDir);
+#else // UNITTESTS
return VirtFsDir::removeFromSearchPath(oldDir);
+#endif // UNITTESTS
}
bool addZipToSearchPath(const std::string &restrict newDir,
const Append append)
{
+#ifdef UNITTESTS
+ return VirtFsZip::addToSearchPathSilent(newDir, append);
+#else // UNITTESTS
return VirtFsZip::addToSearchPath(newDir, append);
+#endif // UNITTESTS
}
bool removeZipFromSearchPath(const std::string &restrict oldDir)
{
+#ifdef UNITTESTS
+ return VirtFsZip::removeFromSearchPathSilent(oldDir);
+#else // UNITTESTS
return VirtFsZip::removeFromSearchPath(oldDir);
+#endif // UNITTESTS
}
std::string getRealDir(std::string filename)