summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/fszip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs/fszip.cpp')
-rw-r--r--src/fs/virtfs/fszip.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp
index 562e0bc80..30f3fbd8e 100644
--- a/src/fs/virtfs/fszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -89,11 +89,17 @@ namespace FsZip
}
bool getRealDir(FsEntry *restrict const entry,
- const std::string &filename,
- const std::string &dirName,
+ std::string filename,
+ std::string dirName,
std::string &realDir)
{
ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
+ std::string subDir = zipEntry->subDir;
+ if (subDir != dirSeparator)
+ {
+ filename = pathJoin(subDir, filename);
+ dirName = pathJoin(subDir, dirName);
+ }
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
it2,
zipEntry->mHeaders)
@@ -128,8 +134,6 @@ namespace FsZip
filename = pathJoin(subDir, filename);
dirName = pathJoin(subDir, dirName);
}
- if (subDir == dirSeparator)
- subDir.clear();
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,
it2,
zipEntry->mHeaders)