[Android] Simplify some checks within the the folder browser in regards to checking if a file is hidden or not. Also potentially fixed the case where items in the game list would not remain saved to the config.
This commit is contained in:
parent
3db2108dbb
commit
c306dafe44
|
@ -64,7 +64,7 @@ public final class FolderBrowser extends Fragment
|
|||
boolean hasExtension = (entryName.lastIndexOf(".") != -1);
|
||||
|
||||
// Skip hidden folders/files.
|
||||
if (entryName.charAt(0) != '.')
|
||||
if (!entry.isHidden())
|
||||
{
|
||||
if(entry.isDirectory())
|
||||
{
|
||||
|
|
|
@ -83,13 +83,10 @@ public final class GameListFragment extends Fragment
|
|||
{
|
||||
String entryName = entry.getName();
|
||||
|
||||
if (entryName.charAt(0) != '.')
|
||||
if (!entry.isHidden() && !entry.isDirectory())
|
||||
{
|
||||
if (!entry.isDirectory())
|
||||
{
|
||||
if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
|
||||
fls.add(new GameListItem(mMe.getApplicationContext(), entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath()));
|
||||
}
|
||||
if (exts.contains(entryName.toLowerCase().substring(entryName.lastIndexOf('.'))))
|
||||
fls.add(new GameListItem(mMe, entryName, getString(R.string.file_size)+entry.length(),entry.getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue