summaryrefslogtreecommitdiff
path: root/src/fs/virtfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs.cpp')
-rw-r--r--src/fs/virtfs.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/fs/virtfs.cpp b/src/fs/virtfs.cpp
index 3ba214dc7..69f379a08 100644
--- a/src/fs/virtfs.cpp
+++ b/src/fs/virtfs.cpp
@@ -87,12 +87,23 @@ namespace VirtFs
bool exists(const std::string &restrict name)
{
+#ifdef USE_PHYSFS
return VirtFsPhys::exists(name);
+#else // USE_PHYSFS
+ return VirtFsDir::exists(name) || VirtFsZip::exists(name);
+#endif // USE_PHYSFS
}
- VirtList *enumerateFiles(const std::string &restrict dir)
+ VirtList *enumerateFiles(const std::string &restrict dirName)
{
+#ifdef USE_PHYSFS
return VirtFsPhys::enumerateFiles(dir);
+#else // USE_PHYSFS
+ VirtList *const list = new VirtList;
+ VirtFsDir::enumerateFiles(dirName, list);
+ VirtFsZip::enumerateFiles(dirName, list);
+ return list;
+#endif // USE_PHYSFS
}
bool isDirectory(const std::string &restrict name)