Skip to content

Minizip append mode doesn't work under Linux #250

@guwangfeng

Description

@guwangfeng

Hi,

I tried minizip under Ubuntu16.04. I first built the libminizip using CMake, then build minizip.c using:

gcc minizip.c -g -o minizip -lminizipd -lz -lbsd

I first used
./minizip a.zip 1.txt
to create a.zip first. It worked well.

Then I used
./minizip -a a.zip 2.txt
to append 2.txt into a.zip.

But seems the "append" mode doesn't work, 1.txt disappered and there was only 2.txt in a.zip.

Did I miss something or something wrong in the minizip?

The following were the command I used:

wfgu-lnx@wfgu-lnx:~/minizip$ ./minizip a.zip 1.txt
Minizip 2.2.8 - https://github.com/nmoinvaz/minizip

Creating a.zip
Adding: 1.txt
wfgu-lnx@wfgu-lnx:~/minizip$ ./minizip -l a.zip
Minizip 2.2.8 - https://github.com/nmoinvaz/minizip

Length Method Size Ratio Date Time CRC-32 Name


  12  Defl:N       14 116%  04-12-18  16:51  af083b2d   1.txt

wfgu-lnx@wfgu-lnx:~/minizip$ ./minizip -a a.zip 2.txt
Minizip 2.2.8 - https://github.com/nmoinvaz/minizip

Creating a.zip
Adding: 2.txt
wfgu-lnx@wfgu-lnx:~/minizip$ ./minizip -l a.zip
Minizip 2.2.8 - https://github.com/nmoinvaz/minizip

Length Method Size Ratio Date Time CRC-32 Name


  28  Defl:N       28 100%  04-12-18  16:51  70fbfdee   2.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixedIssue or bug has been fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions