diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-02 04:28:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-02 04:55:18 +0300 |
commit | 4b1ca08f26152fbcfb5eb838d271fdd88c381eca (patch) | |
tree | a005f6414ead9ae4ee287e6d198bab68ad6bdf63 /src/fs/virtfs/zip.cpp | |
parent | ce9dd5dfa8e49e5204f25e079c1283ab6173b7cb (diff) | |
download | mv-4b1ca08f26152fbcfb5eb838d271fdd88c381eca.tar.gz mv-4b1ca08f26152fbcfb5eb838d271fdd88c381eca.tar.bz2 mv-4b1ca08f26152fbcfb5eb838d271fdd88c381eca.tar.xz mv-4b1ca08f26152fbcfb5eb838d271fdd88c381eca.zip |
Add base class for VirtDirEntry and VirtZipEntry.
Diffstat (limited to 'src/fs/virtfs/zip.cpp')
-rw-r--r-- | src/fs/virtfs/zip.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fs/virtfs/zip.cpp b/src/fs/virtfs/zip.cpp index b1bc45439..3a4e349dc 100644 --- a/src/fs/virtfs/zip.cpp +++ b/src/fs/virtfs/zip.cpp @@ -57,7 +57,7 @@ namespace Zip reportAlways("Entry is null."); return false; } - const std::string archiveName = entry->mArchiveName; + const std::string archiveName = entry->root; std::vector<ZipLocalHeader*> &restrict headers = entry->mHeaders; std::vector<std::string> &restrict dirs = entry->mDirs; FILE *restrict const arcFile = fopen(archiveName.c_str(), @@ -215,12 +215,12 @@ namespace Zip return nullptr; } FILE *restrict const arcFile = fopen( - header->zipEntry->mArchiveName.c_str(), + header->zipEntry->root.c_str(), "r"); if (arcFile == nullptr) { reportAlways("Can't open zip file %s", - header->zipEntry->mArchiveName.c_str()); + header->zipEntry->root.c_str()); return nullptr; } @@ -231,7 +231,7 @@ namespace Zip compressSize) { reportAlways("Read zip compressed file error from archive: %s", - header->zipEntry->mArchiveName.c_str()); + header->zipEntry->root.c_str()); fclose(arcFile); delete [] buf; return nullptr; @@ -269,7 +269,7 @@ namespace Zip int ret = inflateInit2(&strm, -MAX_WBITS); if (ret != Z_OK) { - reportZlibError(header->zipEntry->mArchiveName, ret); + reportZlibError(header->zipEntry->root, ret); delete [] in; delete [] out; return nullptr; |