On Mon, May 1, 2017 at 10:40 PM, Grant Edwards
<[email protected]> wrote:
> The Busybox 'unzip' utility returns a failure status and prints an
> error message when it's given an properly formatted (but empty) zip
> archive.
>
>    $ hexdump -C empty.zip
>    00000000  50 4b 05 06 00 00 00 00  00 00 00 00 00 00 00 00  
> |PK..............|
>    00000010  00 00 00 00 00 00                                 |......|
>    00000016
>
>    $ file empty.zip
>    empty.zip: Zip archive data (empty)
>
>    $ busybox unzip empty.zip || echo FAIL
>    Archive:  empty.zip
>    unzip: invalid zip magic 06054B50
>    FAIL
>
> Why is that an error?

Does not happen with current git:

$ ./busybox unzip z.zip ; echo $?
Archive:  z.zip
0

BTW, the archive is not liked by a "usual" unzip:

$ unzip -v
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.
...
$ unzip z.zip ; echo $?
Archive:  z.zip
warning [z.zip]:  zipfile is empty
1
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to