plugin.zip critical bug

Hello!

The Android version of Plugin.zip v9 seems to be acting strangely.
Specifically, the extracted folder does not include subfolders.
I tried it on Windows/Mac/iOS, and the subfolders are included without any problems. Only the Android version seems to be acting strangely.

Also, this happens on all platforms, but the extracted contents do not include empty folders. Normally, empty folders should be included as well.

I talked about the problem of empty folders not being created a few years ago. At that time, I was given a plugin to test and manually set it in the Solar2D cache.
This time, I built a new development environment, and did not want to manually manipulate the cache like before, so I encountered the same problem again.

https://forums.solar2d.com/t/last-version-of-zip-2020-3627-not-working-correctly-on-android/354828

To summarize, there are two problems when extracting.

  1. The problem of subfolders and below not being included on Android.
  2. The problem of empty folders not being included on all devices.

I hope that a fundamental fix will be made if possible.

Hi @Scott_Harrison. I’ve confirmed that the issue exists, that is the extracted file not contain the subfolder and its contain files, but those files were listed in the uncompress event.response, and the v7/2020.3627-android.tgz performs normal, extracted file match the event.response list.

Test with e1a1916 and build on Mac with NDK r18b, and running on Pixel Android 15 arm64. I have also try with NDK r16b build contains build error.

According to the latest update to binaries was 97782e2, maybe @vlads can shared the build details to debug the issue?

I just tested(for a bit) and released v10 which should fix the issues mentioned

Thanks! It worked!
Tested v10/2020.3627-android.tgz.

I tested it and found that subfolders are extracted, but empty folders are still ignored, which wasn’t the case in older versions. Is this a general rule?

It does this on Mac as well, let me check v7

Yes. Empty folders are ignored on all devices. But before V7, empty folders were included.

For example, a Zip file from a general app will include empty folders when unzipped. As far as I know, only the Solar2D Zip plugin does not include empty folders. I think this is a strange specification.

I don’t know who did it, but it was changed in V7.

The subfolder issue has been resolved on Android so it’s not urgent, but I would like to know why empty folders are not included on all devices and should that be normal?

(post deleted by author)

@Scott_Harrison You may want to see the commit message Directory handling and fix for list() (#4) · coronalabs/com.coronalabs-plugin.zip@33569d7 · GitHub and the relative PR #4.

1 Like

Oh this was over 3 year ago :upside_down_face: