UPDATE: SOLVED,, thank you ww for your answer. It was correct, I striped the path form the file and it works correctly now!
UPDATE: more info: example of unzip on another linux box.
Also, if I use zip from linux, I can unzip the file in windows
root@:/var/www/pcap# unzip -t wpb.eth1.03_09_12_14-3104.pcap.zip
Archive: wpb.eth1.03_09_12_14-3104.pcap.zip
testing: /root/pcap/wpb.eth1.03_09_12_14-3104.pcap OK
No errors detected in compressed data of wpb.eth1.03_09_12_14-3104.pcap.zip.
root@:/var/www/pcap#
Windows error: "The Compressed (zipped) Folder 'c:\<file path>' is invalid"
Hello All,
I am using Archize::Zip in Ubuntu server (Linux Snifferone 3.0.0-16-server #28-Ubuntu SMP Fri Jan 27 18:03:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux), Archive::Zip is up to date (1.30).
It seems to compress just fine, and I can unzip them on another unix box using unzip utility. But when transfered to a windows 7 system, I am unable to unzip using the native windows extract. I believe I am missing a library on the linux, but I am at a loss here.
Thanks, in advance!
Here is my code snip
sub zipfiles { my $path = shift; my $tree_hash_ref = shift; foreach my $file ( keys %$tree_hash_ref ) { $file = "$path$file"; print "DEBUG: zipping $file\n"; my $zip = Archive::Zip->new(); my $file_member = $zip->addFile("$file"); my $fh = IO::File->new( "$file.zip", 'w' ); $fh->binmode; unless ( $zip->writeToFileHandle($fh) == 0 ) { $fh->flush; $fh->close; } $fh->close; print "DEBUG: unlinking $file\n"; unlink($file); } }
In reply to SOLVED: Archive::Zip unable to unzip with native windows 7 by gman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |