Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Archive/Zip/ZipIn.cpp')
-rwxr-xr-xCPP/7zip/Archive/Zip/ZipIn.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/CPP/7zip/Archive/Zip/ZipIn.cpp b/CPP/7zip/Archive/Zip/ZipIn.cpp
index 1048b57d..b36b61be 100755
--- a/CPP/7zip/Archive/Zip/ZipIn.cpp
+++ b/CPP/7zip/Archive/Zip/ZipIn.cpp
@@ -544,7 +544,17 @@ HRESULT CInArchive::FindCd(CCdInfo &cdInfo)
UInt64 curPos = endPosition - bufSize + i;
UInt64 cdEnd = cdInfo.Size + cdInfo.Offset;
if (curPos != cdEnd)
- ArcInfo.Base = curPos - cdEnd;
+ {
+ /*
+ if (cdInfo.Offset <= 16 && cdInfo.Size != 0)
+ {
+ // here we support some rare ZIP files with Central directory at the start
+ ArcInfo.Base = 0;
+ }
+ else
+ */
+ ArcInfo.Base = curPos - cdEnd;
+ }
return S_OK;
}
}