kevva / decompress

Extracting archives made easy
MIT License
415 stars 51 forks source link

Unable to decrompress archive containing folders (compressed with 7zip) #96

Open DarphBobo opened 2 years ago

DarphBobo commented 2 years ago

Hello,

i have some troubles decrompressing a zip file that contains folders. It seems only to be a problem if the file was created using 7zip (on Windows). If I create the archive with the build in windows tool everything works fine.

My archive looks something like that:

archive 
- somefolder
- - someotherfile
- somefile

Results in:

outputfolder
- somefolder ---> **this is a empty file now** 
- somefile

I guess its a problem with decrompess and not with 7zip (other decrompessing tools are working fine with my example archive).

Example: archive_from_7zip.zip

PS: For me it is currently not a problem, I just wanted to inform you about this behaviour.

Thanks & BG Manuel

thisisjar commented 1 year ago

Hello there,

does this behavior also apply to other (non-7zip) .zip files containing nested folder structures?

thisisjar commented 1 year ago

Screenshot 2023-01-17 112051 Can confirm - nested folder structure seems to break Node. I fear, like many (un)zip packages on npm - this one only supports unzipping all files inside a .zip.

magicdawn commented 1 year ago

using decompress(a_epub_file, dir) nothing happens: no error reported, no extracted files.

ePub file is generally a zip file. macOS Keka.app can extract it.

adm-zip can extract it. I guess the reason maybe the same: conatins folders