mirror of
https://github.com/revanced/Apktool.git
synced 2024-11-11 06:59:24 +01:00
Put empty, uncompressed files on doNotCompress list (fixes #2333).
We do not want one empty file to cause all files with that extension to not be compressed, so we always put the full filename on the doNotCompress list in this case.
This commit is contained in:
parent
a04b9cd883
commit
5db19b3329
@ -163,11 +163,13 @@ public class Androlib {
|
||||
try {
|
||||
Directory unk = apkFile.getDirectory();
|
||||
Set<String> files = unk.getFiles(true);
|
||||
String ext;
|
||||
String ext = "";
|
||||
|
||||
for (String file : files) {
|
||||
if (isAPKFileNames(file) && unk.getCompressionLevel(file) == 0 && unk.getSize(file) != 0) {
|
||||
ext = FilenameUtils.getExtension(file);
|
||||
if (isAPKFileNames(file) && unk.getCompressionLevel(file) == 0) {
|
||||
if (unk.getSize(file) != 0) {
|
||||
ext = FilenameUtils.getExtension(file);
|
||||
}
|
||||
|
||||
if (ext.isEmpty() || !NO_COMPRESS_PATTERN.matcher(ext).find()) {
|
||||
ext = file;
|
||||
|
Loading…
Reference in New Issue
Block a user