[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:
Lioncash 2013-09-08 16:45:37 -04:00
parent 3db2108dbb
commit c306dafe44
2 changed files with 4 additions and 7 deletions

View File

@ -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())
{

View File

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