jruesga/CMFileManager

How does compression/uncompress work?

Closed this issue · 3 comments

I am not seeing it in the actions menu and if I click on a zip it prompts m for an app. I though it was built in, no?

I see it only enables when you are not in safe mode - is there a reason for this?

First at all, zip has no compression action, because the busybox versión not implements a zip executable. It can be done by java, by this breaks how shell console works (using always linux commands). Also i think this has some legal concerns. Zip is only supported for uncompression. So, only compression/uncompression executables from busybox were implemented:

compression: gzip, bzip2, tar, tar+gzip, tar+bzip2
uncompression gzip, bzip2, tar, tar+gzip, tar+bzip2, tar+lzma, zip, xz and unix compress

The reason for not enabling unzip in safe mode is that I can't create a sandboxed folder for the uncompression of the zip (as i can do with tar), and the zip can contain relative paths, and if there are uncompressed in a folder, the result is that some extracted files or folder should be extracted in a folder system (overwritting or trying the filesystem). Running sage mode in a non privileged console normally this is not a risk, but i decided not allow it.

OK. Makes sense. Thanks for clarifying
On 2012-10-30 6:32 PM, "Jorge Ruesga" notifications@github.com wrote:

First at all, zip has no compression action, because the busybox versión
not implements a zip executable. It can be done by java, by this breaks how
shell console works (using always linux commands). Also i think this has
some legal concerns. Zip is only supported for uncompression. So, only
compression/uncompression executables from busybox were implemented:

compression: gzip, bzip2, tar, tar+gzip, tar+bzip2
uncompression gzip, bzip2, tar, tar+gzip, tar+bzip2, tar+lzma, zip, xz and
unix compress

The reason for not enabling unzip in safe mode is that I can't create a
sandboxed folder for the uncompression of the zip (as i can do with tar),
and the zip can contain relative paths, and if there are uncompressed in a
folder, the result is that some extracted files or folder should be
extracted in a folder system (overwritting or trying the filesystem).
Running sage mode in a non privileged console normally this is not a risk,
but i decided not allow it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-9925516.