Skip to content

Conversation

@dduponchel
Copy link
Contributor

This fixes 3 issues :

  • folder() should be like remove() : without any argument, just return this.
  • when generating a zip file, the "is a directory" flag wasn't set.
  • reading nested zip files with data descriptors didn't work. The fix don't try to read/guess the size of the compressed data (we know it from the central dir), it should help the issue memory efficiency improvements #30.

See the commit messages for more details.

Like remove(), without any argument, we should just return `this`.
Instead of reading the central dir and then the local dir (and trying to
handle all the cases, data descriptors, data descriptors with zip64, etc)
I just read the central dir, hoping that everything is here. (The only
exception is the file name : for some reasons, some zip have the real
name : with / instead of \ in the local dir)

This fixes an issue with nested zip files and data descriptors. When the
size was 0 in the local dir, we would seek the next occurence of the
data descriptor signature. With zip containing data descriptors, this
would lead to a bug.

This should also help the issue Stuk#30 : the new code avoids the overhead of
looking for data descriptors.

Other change : I explained the limitations of the zip64 extensions in
the browser.
@Stuk
Copy link
Owner

Stuk commented Feb 8, 2013

Looks good!

Stuk added a commit that referenced this pull request Feb 8, 2013
Use the central dir instead of the local file header (+ other patches)
@Stuk Stuk merged commit e45a4d7 into Stuk:master Feb 8, 2013
@dduponchel dduponchel deleted the issue30 branch February 8, 2013 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants