jokkebk / JUnzip

Minimalistic unzip library released into public domain.
The Unlicense
55 stars 17 forks source link

Couldn't open <name> for writing! #1

Closed D8174 closed 10 years ago

D8174 commented 10 years ago

I compiled this library and ran the demo and I get a bunch of these errors. It looks like it can't handle folders inside zips?

jokkebk commented 10 years ago

Hi,

Yeah, that's true. Folder support would be quite easy to add - just split the entry filename on folder separator (/ and ) and create parts of path that don't exist. It could be even done in place of the filename buffer by replacing separators with '\0'.

Joonas

Ps. Btw nice to hear you tried it out!

On Saturday, January 11, 2014, mike-pm wrote:

I compiled this library and ran the demo and I get a bunch of these errors. It looks like it can't handle folders inside zips?

— Reply to this email directly or view it on GitHubhttps://github.com/jokkebk/JUnzip/issues/1 .

D8174 commented 10 years ago

Well I don't really need the writing utility anyway, but thanks. JUnzip does exactly what I need it to. :+1:

jokkebk commented 10 years ago

There's now a placeholder for (platform-specific) mkdir() implementation, and the demo should now fail gracefully on zips containing directories (it effectively skips files that have slashes in filename). With mkdir() in place, it works also with directories.