From b57cb30c41a2ad36f6e32e8d7e80f51fe385be3f Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Thu, 3 Mar 2016 08:29:51 -0600 Subject: [PATCH] [Android] Make sure the file extension check isn't case sensitive --- .../main/java/org/dolphinemu/dolphinemu/model/FileListItem.java | 2 +- .../main/java/org/dolphinemu/dolphinemu/model/GameDatabase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java index e6fdacc110..b90a710c2c 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/FileListItem.java @@ -45,7 +45,7 @@ public class FileListItem implements Comparable Set allowedExtensions = new HashSet(Arrays.asList(".dff", ".dol", ".elf", ".gcm", ".gcz", ".iso", ".wad", ".wbfs")); // Check that the file has an extension we care about before trying to read out of it. - if (allowedExtensions.contains(fileExtension)) + if (allowedExtensions.contains(fileExtension.toLowerCase())) { // Add 1 because 0 = TYPE_FOLDER mType = NativeLibrary.GetPlatform(mPath) + 1; diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameDatabase.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameDatabase.java index a09fd3d319..b9af9ee631 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameDatabase.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/model/GameDatabase.java @@ -181,7 +181,7 @@ public final class GameDatabase extends SQLiteOpenHelper String fileExtension = filePath.substring(extensionStart); // Check that the file has an extension we care about before trying to read out of it. - if (allowedExtensions.contains(fileExtension)) + if (allowedExtensions.contains(fileExtension.toLowerCase())) { String name = NativeLibrary.GetTitle(filePath);