Skip to content

Commit

Permalink
#19 More fixes for directory processing
Browse files Browse the repository at this point in the history
  • Loading branch information
pmqs committed Apr 25, 2024
1 parent f02ffd1 commit 68a3fdf
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bin/zipdetails
Original file line number Diff line number Diff line change
Expand Up @@ -2063,10 +2063,6 @@ sub LocalHeader
$localEntry->filename($raw_filename) ;
$filename = outputFilename($raw_filename, $LanguageEncodingFlag);
$localEntry->outputFilename($filename);

# APPNOTE 6.3.10, sec 4.3.8
warning $FH->tell - $filenameLength, "Directory '$filename' must not have a payload"
if ! $streaming && $filename =~ m#/$# && $uncompressedSize ;
}

$localEntry->localHeaderOffset($locHeaderOffset) ;
Expand Down Expand Up @@ -2094,6 +2090,10 @@ sub LocalHeader
walkExtra($extraLength, $localEntry);
}

# APPNOTE 6.3.10, sec 4.3.8
warning $FH->tell - $filenameLength, "Directory '$filename' must not have a payload"
if ! $streaming && $filename =~ m#/$# && $localEntry->uncompressedSize ;

my @msg ;
# if ($cdZip64 && ! $ZIP64)
# {
Expand Down Expand Up @@ -2852,7 +2852,8 @@ sub CentralHeader
# $cdEntry->endCentralHeaderOffset($FH->tell() - 1);

# Can only validate for directory after zip64 data is read
validateDirectory($cdEntryOffset, $filename, $extractVer, $made_by, $compressedSize, $uncompressedSize, $ext_file_attrib);
validateDirectory($cdEntryOffset, $filename, $extractVer, $made_by,
$cdEntry->compressedSize, $cdEntry->uncompressedSize, $ext_file_attrib);

if ($comment_length)
{
Expand Down

0 comments on commit 68a3fdf

Please sign in to comment.