fix(gui): compare files extension in case insensitive way

This commit is contained in:
Skylot
2019-07-22 18:26:39 +03:00
parent c8de7b97dd
commit 9fbf9ef667
@@ -5,8 +5,9 @@ public enum ResourceType {
MANIFEST("AndroidManifest.xml"),
XML(".xml"),
ARSC(".arsc"),
FONT(".ttf"),
FONT(".ttf", ".otf"),
IMG(".png", ".gif", ".jpg"),
MEDIA(".mp3", ".wav"),
LIB(".so"),
UNKNOWN;
@@ -23,7 +24,7 @@ public enum ResourceType {
public static ResourceType getFileType(String fileName) {
for (ResourceType type : ResourceType.values()) {
for (String ext : type.getExts()) {
if (fileName.endsWith(ext)) {
if (fileName.toLowerCase().endsWith(ext)) {
return type;
}
}