zhanghai / MaterialFiles

Material Design file manager for Android
https://play.google.com/store/apps/details?id=me.zhanghai.android.files
GNU General Public License v3.0
6.07k stars 410 forks source link

Extracting creates a directory even when not needed #1267

Open jedenastka opened 4 months ago

jedenastka commented 4 months ago

Extracting archives from the context menu (three dots) causes Material Files to create a separate directory in the target location (presumably for tarbomb protection), even if there's only file (plain or directory) in the archive. This behavior can be confusing to users (have had a confused user report this to me).

Reproducing

  1. Download the examples onto your device.

    As you can see, neither example is a tarbomb.

  2. In Material Files, open the context menu for each and extract them somewhere.

Observed behavior

The following directory structure for extracted single_file.zip:

The following directory structure for extracted single_dir.zip:

Expected behavior

The following directory structure for extracted single_file.zip:

The following directory structure for extracted single_dir.zip:

For actual tarbombs, the behavior should remain as it is.