Describe the bug
ZipArchive::new(f) returns InvalidArchive("Extra field header truncated") for a ZIP archive that unzip and Android runtime handle successfully.
To Reproduce
-
Download an APK from APKMirror
-
Rename it for convenience:
mv 'bin.mt.plus_2.26.2-26020493_minAPI21(arm64-v8a,armeabi-v7a,x86,x86_64)(nodpi)_apkmirror.com.apk' bin.mt.plus_2.26.2.apk
-
Verify it is a valid ZIP:
unzip -l bin.mt.plus_2.26.2.apk | tail -5
-
Run the following code:
let f = File::open("bin.mt.plus_2.26.2.apk").unwrap();
let archive = ZipArchive::new(f);
dbg!(&archive);
-
See error
Expected behavior
ZipArchive::new(f) returns Ok(ZipArchive<File>).
Desktop (please complete the following information):
- OS: Linux
- zip version: 8.1.0