Unzipping archives, preserving folder hierarchy

Posted by Hydrangea on Super User See other posts from Super User or by Hydrangea
Published on 2012-06-23T20:43:41Z Indexed on 2012/06/24 3:18 UTC
Read the original article Hit count: 411

Filed under:
|
|

I've got a problem and am not sure what it is, but hope someone can help me think this through because this has me stumped.

Backstory:

I wrote a Java app (Android) that unzips some zip files downloaded from the network. Until now, this was working great. Then, this week, the archives that I'm creating on my pc (in Ubuntu 12.04) unzip on the Android phone into a flat hierarchy instead of preserving the folders. I'm creating the archives the same way (right-click on folder > compress) but even though my old archives (created in 10.04) still unzip as expected, the new ones don't. On Ubuntu, the new zip files look the same to me as the old ones. When unzipped on my pc the folders in these new archives are restored the same as the old ones... it's the Android app that extracts the old ones fine and the new ones flat. What I really want to know, though, is what the difference between the archives is.

Question:

How could one determine why one zip archive would be extracted with folder hierarchy preserved, when an identical one (to all appearances on Ubuntu 12.04) is extracted with no hierarchy? Are there different ways in which a .zip file can "have" folders, but Ubuntu doesn't distinguish between them?

© Super User or respective owner

Related posts about ubuntu

Related posts about folder