Fix the massive list of uncompressed 9.png that prevents recompile on Windows

Windows has its limits, even Windows 10, at least on older versions before the max path length restriction was removed.
Because apktool failed to recognize the .9.png extension as a variety of the .png extension, those .9.png files were piling up in apktool.yml and then passed to aapt, which would fail to run on Windows because of an immense command length.
This fix makes a special exception for the .png exception and will allow the .9.png one to pass as another .png extension.

Before: http://dpaste.com/2BC3RRB
After: http://dpaste.com/177CVZQ
This commit is contained in:
Igor Eisberg 2019-03-03 15:08:28 +02:00 committed by Connor Tumbleson
parent 103aa978df
commit bc9f465f3e
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75

View File

@ -172,15 +172,10 @@ public class Androlib {
unk.getCompressionLevel(file) == 0 &&
unk.getSize(file) != 0) {
if (StringUtils.countMatches(file, ".") > 1) {
ext = FilenameUtils.getExtension(file);
if (ext.isEmpty() || (!ext.equals("png") && StringUtils.countMatches(file, ".") > 1)) {
ext = file;
} else {
ext = FilenameUtils.getExtension(file);
if (ext.isEmpty()) {
ext = file;
}
}
if (!uncompressedFilesOrExts.contains(ext)) {
uncompressedFilesOrExts.add(ext);
}