aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-01-30 01:14:21 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-01-30 01:14:21 +0000
commit1e25c5bece7ebb60ca46a332e019db700d26e365 (patch)
treebea3c640281513d2da0962cd3716d52e3bcaa9a5 /phpBB/includes
parentdb672ef596b740974f7c0cbb8c613642457f8867 (diff)
downloadforums-1e25c5bece7ebb60ca46a332e019db700d26e365.tar
forums-1e25c5bece7ebb60ca46a332e019db700d26e365.tar.gz
forums-1e25c5bece7ebb60ca46a332e019db700d26e365.tar.bz2
forums-1e25c5bece7ebb60ca46a332e019db700d26e365.tar.xz
forums-1e25c5bece7ebb60ca46a332e019db700d26e365.zip
- We don't use the extra info because we can extrapolate the only thing of use (attributes) by using logic. Thus, we can skip large amounts of the file without missing any information.
git-svn-id: file:///svn/phpbb/trunk@5511 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_compress.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index c99328f54c..2d226aefa2 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -238,13 +238,10 @@ class compress_zip extends compress
fclose($fp);
break;
- // 'Central Directory Header'
+ // We hit the 'Central Directory Header', we can stop because nothing else in here requires our attention
+ // or we hit the end of the central directory record, we can safely end the loop as we are totally finished with looking for files and folders
case "\x50\x4b\x01\x02":
- fseek($this->fp, 24, SEEK_CUR);
- fseek($this->fp, 12 + current(unpack("v", fread($this->fp, 2))) + current(unpack("v", fread($this->fp, 2))) + current(unpack("v", fread($this->fp, 2))), SEEK_CUR);
- break;
-
- // Hit the end of the central directory record, we can safely end the loop as we are totally finished with looking for files and folders
+ // This case should simply never happen.. but it does exist..
case "\x50\x4b\x05\x06":
break 2;