Increase the search depth slightly
This will account for storing games in a second-tier folder, such as putting bins in one directory and chd in another with each game having it’s own folder for bin and cue. The BIOS search should handle 4 levels to account for the use of /Android/data/com.reicast.emulator/files but should also ignore directories, such as cache and obb, where the file will never be.
This commit is contained in:
parent
0f4afb29c3
commit
37625778e5
|
@ -239,12 +239,11 @@ public class FileBrowser extends Fragment {
|
|||
filter[i] = new FilenameFilter() {
|
||||
|
||||
public boolean accept(File dir, String name) {
|
||||
if (dir.getName().startsWith(".")
|
||||
|| name.startsWith(".")) {
|
||||
if (dir.getName().equals("obb") || dir.getName().equals("cache")
|
||||
|| dir.getName().startsWith(".") || name.startsWith(".")) {
|
||||
return false;
|
||||
} else {
|
||||
return StringUtils.endsWithIgnoreCase(name, "."
|
||||
+ type);
|
||||
return StringUtils.endsWithIgnoreCase(name, "." + type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,7 +252,11 @@ public class FileBrowser extends Fragment {
|
|||
}
|
||||
|
||||
FileUtils fileUtils = new FileUtils();
|
||||
Collection<File> files = fileUtils.listFiles(storage, filter, 1);
|
||||
int recurse = 2;
|
||||
if (array != R.array.images) {
|
||||
recurse = 4;
|
||||
}
|
||||
Collection<File> files = fileUtils.listFiles(storage, filter, recurse);
|
||||
return (List<File>) files;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue