File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ public int Version
576
576
}
577
577
else {
578
578
int result = 10 ;
579
- if ( LocalHeaderRequiresZip64 ) {
579
+ if ( CentralHeaderRequiresZip64 ) {
580
580
result = ZipConstants . VersionZip64 ;
581
581
}
582
582
else if ( CompressionMethod . Deflated == method ) {
@@ -647,7 +647,7 @@ public bool LocalHeaderRequiresZip64
647
647
// TODO: A better estimation of the true limit based on compression overhead should be used
648
648
// to determine when an entry should use Zip64.
649
649
result =
650
- ( ( this . size >= uint . MaxValue ) || ( trueCompressedSize >= uint . MaxValue ) || ( this . offset >= uint . MaxValue ) ) &&
650
+ ( ( this . size >= uint . MaxValue ) || ( trueCompressedSize >= uint . MaxValue ) ) &&
651
651
( ( versionToExtract == 0 ) || ( versionToExtract >= ZipConstants . VersionZip64 ) ) ;
652
652
}
653
653
@@ -661,7 +661,7 @@ public bool LocalHeaderRequiresZip64
661
661
public bool CentralHeaderRequiresZip64
662
662
{
663
663
get {
664
- return LocalHeaderRequiresZip64 ;
664
+ return LocalHeaderRequiresZip64 || ( offset >= uint . MaxValue ) ;
665
665
}
666
666
}
667
667
@@ -871,7 +871,7 @@ internal void ProcessExtraData(bool localHeader)
871
871
compressedSize = ( ulong ) extraData . ReadLong ( ) ;
872
872
}
873
873
874
- if ( ! localHeader && ( offset == - 1 ) ) {
874
+ if ( ! localHeader && ( offset == uint . MaxValue ) ) {
875
875
offset = extraData . ReadLong ( ) ;
876
876
}
877
877
}
You can’t perform that action at this time.
0 commit comments