summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-09-11 12:38:15 +0200
committerAndras Timar <atimar@suse.com>2012-09-11 12:38:15 +0200
commited08ddb31ba37da393a42586cbaa4c19e771598c (patch)
tree693056e41a3b4c7dae5b7bae5954a67c236d4ec6
parent3e635c3368c23608bac471970f18d1d64684a147 (diff)
fdo#53588 Assume cdir being in the last 1k of the file to speed-up search
Change-Id: I25291c52d9f0117c70c48781c2eb575bb6b374ff
-rw-r--r--shell/source/win32/zipfile/zipfile.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index 381e52cf7642..70a20f765038 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -264,6 +264,7 @@ static bool findCentralDirectoryEnd(StreamInterface *stream)
if (!stream)
return false;
stream->sseek(0, SEEK_SET);
+ if (stream->sseek(-1024, SEEK_END)) stream->sseek(0, SEEK_SET);
try
{
while (stream->stell() != -1)