[Android] Only show valid files in the file browser.
This commit is contained in:
parent
c2dac38ca1
commit
d9485cbf23
|
@ -50,7 +50,6 @@ public final class FolderBrowser extends Fragment
|
||||||
|
|
||||||
// Supported extensions to filter by
|
// Supported extensions to filter by
|
||||||
Set<String> validExts = new HashSet<String>(Arrays.asList(".gcm", ".iso", ".wbfs", ".gcz", ".dol", ".elf", ".dff"));
|
Set<String> validExts = new HashSet<String>(Arrays.asList(".gcm", ".iso", ".wbfs", ".gcz", ".dol", ".elf", ".dff"));
|
||||||
Set<String> invalidExts = new HashSet<String>(Arrays.asList(".zip", ".rar", ".7z"));
|
|
||||||
|
|
||||||
// Search for any directories or files within the current dir.
|
// Search for any directories or files within the current dir.
|
||||||
for(File entry : dirs)
|
for(File entry : dirs)
|
||||||
|
@ -73,10 +72,6 @@ public final class FolderBrowser extends Fragment
|
||||||
{
|
{
|
||||||
fls.add(new FolderBrowserItem(entryName, getString(R.string.file_size)+entry.length(), entry.getAbsolutePath(), true));
|
fls.add(new FolderBrowserItem(entryName, getString(R.string.file_size)+entry.length(), entry.getAbsolutePath(), true));
|
||||||
}
|
}
|
||||||
else if (invalidExts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
|
|
||||||
{
|
|
||||||
fls.add(new FolderBrowserItem(entryName, getString(R.string.file_size)+entry.length(), entry.getAbsolutePath(), false));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue