diff options
Diffstat (limited to 'src/fs/virtfs/fszip.cpp')
-rw-r--r-- | src/fs/virtfs/fszip.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp index eda5dd078..562e0bc80 100644 --- a/src/fs/virtfs/fszip.cpp +++ b/src/fs/virtfs/fszip.cpp @@ -118,10 +118,18 @@ namespace FsZip } bool exists(FsEntry *restrict const entry, - const std::string &filename, - const std::string &dirName) + std::string filename, + std::string dirName) { ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry); + std::string subDir = zipEntry->subDir; + if (subDir != dirSeparator) + { + filename = pathJoin(subDir, filename); + dirName = pathJoin(subDir, dirName); + } + if (subDir == dirSeparator) + subDir.clear(); FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator, it2, zipEntry->mHeaders) |