diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-07 22:02:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-07 22:02:59 +0300 |
commit | bbd71d4a8c95092deb9cbf4aef86722a1e9628db (patch) | |
tree | 59566c4baa2e32287fe5867e5616ca560d3f3bf5 /src/fs/virtfs/zip.cpp | |
parent | 6f7f469430ea05946a11dd41f62010961be6285e (diff) | |
download | ManaVerse-bbd71d4a8c95092deb9cbf4aef86722a1e9628db.tar.gz ManaVerse-bbd71d4a8c95092deb9cbf4aef86722a1e9628db.tar.bz2 ManaVerse-bbd71d4a8c95092deb9cbf4aef86722a1e9628db.tar.xz ManaVerse-bbd71d4a8c95092deb9cbf4aef86722a1e9628db.zip |
Fix unit tests on windows.
Diffstat (limited to 'src/fs/virtfs/zip.cpp')
-rw-r--r-- | src/fs/virtfs/zip.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fs/virtfs/zip.cpp b/src/fs/virtfs/zip.cpp index 8dd7d8080..0556af1f8 100644 --- a/src/fs/virtfs/zip.cpp +++ b/src/fs/virtfs/zip.cpp @@ -36,6 +36,8 @@ #include "debug.h" +extern const char *dirSeparator; + #define readVal(val, sz, msg) \ cnt = fread(static_cast<void*>(val), 1, sz, arcFile); \ if (cnt != sz) \ @@ -131,7 +133,7 @@ namespace Zip header->dataOffset = ftell(arcFile) + extraFieldLen; fseek(arcFile, extraFieldLen + header->compressSize, SEEK_CUR); // pointer on 30 + fileNameLen + extraFieldLen + compressSize - if (findLast(header->fileName, "/") == false) + if (findLast(header->fileName, dirSeparator) == false) { headers.push_back(header); logger->log(" file name: %s", @@ -145,6 +147,8 @@ namespace Zip } else { + logger->log(" dir name: %s", + header->fileName.c_str()); dirs.push_back(header->fileName); delete header; } |