Skip Menu |
 

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 128626
Status: resolved
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: Chris.Denley [...] experian.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.086



Date: Mon, 25 Feb 2019 19:04:28 +0000
Subject: mainframe zip archive
To: "bug-IO-Compress [...] rt.cpan.org" <bug-IO-Compress [...] rt.cpan.org>
From: "Denley, Chris" <Chris.Denley [...] experian.com>
Download (untitled) / with headers
text/plain 1.3k
IO::Uncompress::Unzip sees two streams for files in zip archive created on an IBM mainframe use IO::Uncompress::Unzip qw($UnzipError); my $zipfile = "mf.zip"; my $u = new IO::Uncompress::Unzip $zipfile or die "Cannot open $zipfile: $UnzipError"; my $status; for ($status = 1; $status > 0; $status = $u->nextStream()) { my $name = $u->getHeaderInfo()->{Name}; warn "Processing member $name\n" ; } die "Error processing $zipfile: $!\n" if $status < 0 ; M:\>perl mf.pl Processing member SYS19056/T123412/RA000/MNE#ZIPL/TESTING/H0D Processing member SYS19056/T123412/RA000/MNE#ZIPL/TESTING/H0D M:\>"C:\Program Files\7-Zip\7z.exe" l mf.zip 7-Zip 18.05 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2018-04-30 Scanning the drive for archives: 1 file, 23316 bytes (23 KiB) Listing archive: mf.zip -- Path = mf.zip Type = zip WARNINGS: There are data after the end of archive Physical Size = 465 Tail Size = 22851 Comment = PKZIP for z/OS by PKWARE Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2019-02-25 12:34:12 ..... 329 157 SYS19056\T123412\RA000\MNE#ZIPL\TESTING\H0D ------------------- ----- ------------ ------------ ------------------------ 2019-02-25 12:34:12 329 157 1 files Warnings: 1 M:\>
Download (untitled) / with headers
text/html 17.4k

Message body is not shown because it is too large.

Download mf.zip
application/x-zip-compressed 22.7k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 666b
Hey Chris, thanks for the bug report and, even better, for code to reproduce the problem. Makes life so much easier for me. I get exactly the same as you when I run your script. The one thing slightly unusual about this zip file is the huge amount of trailing data that comes directly after the zip data. The zip file at the start is 465 bytes - the next ~20k is null bytes. Interestingly, if I remove that trailing data, your test script only shows one stream. Quick question - do you know if trailing data in a "feature" of PKZIP for z/OS by PKWARE, or for IBM Mainframe files? Regardless, this appears to be a bug in my code. Will investigate. thanks Paul
Date: Mon, 25 Feb 2019 22:21:24 +0000
Subject: RE: [rt.cpan.org #128626] mainframe zip archive
To: "bug-IO-Compress [...] rt.cpan.org" <bug-IO-Compress [...] rt.cpan.org>
From: "Denley, Chris" <Chris.Denley [...] experian.com>
Download (untitled) / with headers
text/plain 1.1k
Sorry, I'm not familiar with PKZIP or mainframes, but it seems to be there by default. Our current workaround is to ignore streams with duplicate file names. Thanks for the support! Show quoted text
-----Original Message----- From: Paul Marquess via RT [mailto:bug-IO-Compress@rt.cpan.org] Sent: Monday, February 25, 2019 4:06 PM To: Denley, Chris <Chris.Denley@experian.com> Subject: [rt.cpan.org #128626] mainframe zip archive <URL: https://rt.cpan.org/Ticket/Display.html?id=128626 > Hey Chris, thanks for the bug report and, even better, for code to reproduce the problem. Makes life so much easier for me. I get exactly the same as you when I run your script. The one thing slightly unusual about this zip file is the huge amount of trailing data that comes directly after the zip data. The zip file at the start is 465 bytes - the next ~20k is null bytes. Interestingly, if I remove that trailing data, your test script only shows one stream. Quick question - do you know if trailing data in a "feature" of PKZIP for z/OS by PKWARE, or for IBM Mainframe files? Regardless, this appears to be a bug in my code. Will investigate. thanks Paul
Download (untitled) / with headers
text/plain 265b
Hey Chris, quick workaround for you. Try setting the Transparent option to false when you open the zip file. That made the issue go away for me. my $u = new IO::Uncompress::Unzip $zipfile, Transparent => 0 or die "Cannot open $zipfile: $UnzipError"; Paul


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.