diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-02-24 19:10:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-02-24 23:31:22 +0300 |
commit | 0bb68a88e6dc6a04685825e80b4e3dca1dc097d2 (patch) | |
tree | 07a4e3bd321c5199fe4d388a1c6cb9923a147c0c /src/fs/virtfileprivate.cpp | |
parent | d1b37a4b299809c3eb11b073ab4eafdb773b8a45 (diff) | |
download | manaplus-0bb68a88e6dc6a04685825e80b4e3dca1dc097d2.tar.gz manaplus-0bb68a88e6dc6a04685825e80b4e3dca1dc097d2.tar.bz2 manaplus-0bb68a88e6dc6a04685825e80b4e3dca1dc097d2.tar.xz manaplus-0bb68a88e6dc6a04685825e80b4e3dca1dc097d2.zip |
Add support for extract files from zip archives.
Diffstat (limited to 'src/fs/virtfileprivate.cpp')
-rw-r--r-- | src/fs/virtfileprivate.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fs/virtfileprivate.cpp b/src/fs/virtfileprivate.cpp index 1dcc6116c..5ebb234cc 100644 --- a/src/fs/virtfileprivate.cpp +++ b/src/fs/virtfileprivate.cpp @@ -21,6 +21,7 @@ #include "fs/virtfileprivate.h" #include <unistd.h> +#include <zlib.h> #include "debug.h" @@ -36,7 +37,7 @@ VirtFilePrivate::VirtFilePrivate(const int fd) : { } -VirtFilePrivate::VirtFilePrivate(PHYSFS_file *const file) : +VirtFilePrivate::VirtFilePrivate(PHYSFS_file *restrict const file) : mFile(file), mFd(-1) { @@ -45,10 +46,7 @@ VirtFilePrivate::VirtFilePrivate(PHYSFS_file *const file) : VirtFilePrivate::~VirtFilePrivate() { if (mFile != nullptr) - { PHYSFS_close(mFile); - mFile = nullptr; - } if (mFd != -1) close(mFd); } |