aboutsummaryrefslogtreecommitdiff
path: root/common/unzip.cpp
diff options
context:
space:
mode:
authorVicent Marti2008-10-09 17:56:07 +0000
committerVicent Marti2008-10-09 17:56:07 +0000
commitbb619b457844a9b9f4acc60d08ce730a8f968301 (patch)
treea2ed5d153f0cf2d3b679801854d444251326b435 /common/unzip.cpp
parentec60fc6db719b318c38b18f4bf23ae55c59f6d61 (diff)
downloadscummvm-rg350-bb619b457844a9b9f4acc60d08ce730a8f968301.tar.gz
scummvm-rg350-bb619b457844a9b9f4acc60d08ce730a8f968301.tar.bz2
scummvm-rg350-bb619b457844a9b9f4acc60d08ce730a8f968301.zip
- Fixed theme loading from Zip files.
- Changed Common::ZipArchive to use FSNodes instead of full paths (external API unchanged). svn-id: r34761
Diffstat (limited to 'common/unzip.cpp')
-rw-r--r--common/unzip.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/unzip.cpp b/common/unzip.cpp
index 9049b000d7..ac0d64df8f 100644
--- a/common/unzip.cpp
+++ b/common/unzip.cpp
@@ -79,6 +79,7 @@
#include <zlib.h>
#endif
+#include "common/fs.h"
#include "common/unzip.h"
#include "common/file.h"
@@ -91,7 +92,6 @@ typedef unzFile__ *unzFile;
typedef voidp unzFile;
#endif
-
#define UNZ_OK (0)
#define UNZ_END_OF_LIST_OF_FILE (-100)
#define UNZ_ERRNO (Z_ERRNO)
@@ -487,7 +487,7 @@ static uLong unzlocal_SearchCentralDir(Common::File &fin) {
Else, the return value is a unzFile Handle, usable with other function
of this unzip package.
*/
-unzFile unzOpen(const char *path) {
+unzFile unzOpen(const Common::FSNode &node) {
unz_s *us = new unz_s;
uLong central_pos,uL;
@@ -501,7 +501,7 @@ unzFile unzOpen(const char *path) {
int err=UNZ_OK;
- if (!us->file.open(path)) {
+ if (!us->file.open(node)) {
delete us;
return NULL;
}
@@ -1377,7 +1377,11 @@ public:
*/
ZipArchive::ZipArchive(const Common::String &name) {
- _zipFile = unzOpen(name.c_str());
+ _zipFile = unzOpen(Common::FSNode(name));
+}
+
+ZipArchive::ZipArchive(const Common::FSNode &node) {
+ _zipFile = unzOpen(node);
}
ZipArchive::~ZipArchive() {