aboutsummaryrefslogtreecommitdiff
path: root/common/unzip.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-10-03 16:57:40 +0000
committerJohannes Schickel2008-10-03 16:57:40 +0000
commite4174711773c7dab12faf870c6d4973a2bdcff0b (patch)
tree9cd74919429e2592d28024d7f3c4ea43252c4b90 /common/unzip.cpp
parent4b236a787f028259f3a8c6a63c86bc8661a35438 (diff)
downloadscummvm-rg350-e4174711773c7dab12faf870c6d4973a2bdcff0b.tar.gz
scummvm-rg350-e4174711773c7dab12faf870c6d4973a2bdcff0b.tar.bz2
scummvm-rg350-e4174711773c7dab12faf870c6d4973a2bdcff0b.zip
Committed slightly modified patch #2034983 "Case-insensitivy and directory handling for engines".
svn-id: r34734
Diffstat (limited to 'common/unzip.cpp')
-rw-r--r--common/unzip.cpp29
1 files changed, 4 insertions, 25 deletions
diff --git a/common/unzip.cpp b/common/unzip.cpp
index 894631b262..9049b000d7 100644
--- a/common/unzip.cpp
+++ b/common/unzip.cpp
@@ -1392,26 +1392,6 @@ bool ZipArchive::hasFile(const Common::String &name) {
return (_zipFile && unzLocateFile(_zipFile, name.c_str(), 2) == UNZ_OK);
}
-int ZipArchive::getAllNames(Common::StringList &list) {
- if (!_zipFile)
- return 0;
-
- if (unzGoToFirstFile(_zipFile) != UNZ_OK)
- return 0;
-
- char fileNameBuffer[UNZ_MAXFILENAMEINZIP + 1];
- int fileCount = 0;
-
- do {
- unzGetCurrentFileInfo(_zipFile, 0, fileNameBuffer, UNZ_MAXFILENAMEINZIP + 1, 0, 0, 0, 0);
- list.push_back(Common::String(fileNameBuffer));
- fileCount++;
- } while (unzGoToNextFile(_zipFile) == UNZ_OK);
-
- return fileCount;
-}
-
-/*
int ZipArchive::listMembers(Common::ArchiveMemberList &list) {
if (!_zipFile)
return 0;
@@ -1424,14 +1404,13 @@ int ZipArchive::listMembers(Common::ArchiveMemberList &list) {
unzGetCurrentFileInfo(_zipFile, NULL,
szCurrentFileName, sizeof(szCurrentFileName)-1,
NULL, 0, NULL, 0);
-
- szCurrentFileName
+ list.push_back(ArchiveMemberList::value_type(new GenericArchiveMember(szCurrentFileName, this)));
matches++;
- err = unzGoToNextFile(file);
+ err = unzGoToNextFile(_zipFile);
}
- return 0;
+
+ return matches;
}
-*/
Common::SeekableReadStream *ZipArchive::openFile(const Common::String &name) {
if (!_zipFile)