Merge pull request #3703 from Sonicadvance1/android_case_insensitive

[Android] Make sure the file extension check isn't case sensitive
This commit is contained in:
Ryan Houdek 2016-03-03 09:44:00 -05:00
commit 46b5b07883
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ public class FileListItem implements Comparable<FileListItem>
Set<String> allowedExtensions = new HashSet<String>(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;

View File

@ -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);