Skip to content

Commit

Permalink
fix(gui): compare files extension in case insensitive way
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jul 22, 2019
1 parent c8de7b9 commit 9fbf9ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jadx-core/src/main/java/jadx/api/ResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -23,7 +24,7 @@ public String[] getExts() {
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;
}
}
Expand Down

0 comments on commit 9fbf9ef

Please sign in to comment.