summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/fszip.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-16 18:10:29 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-16 18:10:29 +0300
commit5844f83998040d4a79dc442151a21dc17de60feb (patch)
tree676268ac999c9009eca96a182f3de9571da24d67 /src/fs/virtfs/fszip.cpp
parent3cf47056f239f1096590c27c1d401904a54f84fc (diff)
downloadplus-5844f83998040d4a79dc442151a21dc17de60feb.tar.gz
plus-5844f83998040d4a79dc442151a21dc17de60feb.tar.bz2
plus-5844f83998040d4a79dc442151a21dc17de60feb.tar.xz
plus-5844f83998040d4a79dc442151a21dc17de60feb.zip
Add subdir support in VirtFs::getFiles.
Diffstat (limited to 'src/fs/virtfs/fszip.cpp')
-rw-r--r--src/fs/virtfs/fszip.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fs/virtfs/fszip.cpp b/src/fs/virtfs/fszip.cpp
index 91d323cc1..b2e123f49 100644
--- a/src/fs/virtfs/fszip.cpp
+++ b/src/fs/virtfs/fszip.cpp
@@ -156,7 +156,7 @@ namespace FsZip
StringVect &names)
{
ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
- std::string subDir = zipEntry->subDir;
+ const std::string subDir = zipEntry->subDir;
if (subDir != dirSeparator)
dirName = pathJoin(subDir, dirName);
if (dirName == dirSeparator)
@@ -215,10 +215,13 @@ namespace FsZip
}
void getFiles(FsEntry *restrict const entry,
- const std::string &dirName,
+ std::string dirName,
StringVect &names)
{
ZipEntry *const zipEntry = static_cast<ZipEntry*>(entry);
+ const std::string subDir = zipEntry->subDir;
+ if (subDir != dirSeparator)
+ dirName = pathJoin(subDir, dirName);
if (dirName == dirSeparator)
{
FOR_EACH (std::vector<ZipLocalHeader*>::const_iterator,