Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Simplify some checks within the the folder browser in regar…
…ds 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.
  • Loading branch information
lioncash committed Sep 8, 2013
1 parent 3db2108 commit c306daf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Expand Up @@ -64,7 +64,7 @@ private void Fill(File currDir)
boolean hasExtension = (entryName.lastIndexOf(".") != -1);

// Skip hidden folders/files.
if (entryName.charAt(0) != '.')
if (!entry.isHidden())
{
if(entry.isDirectory())
{
Expand Down
Expand Up @@ -83,13 +83,10 @@ private void Fill()
{
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()));
}
}
}
Expand Down

0 comments on commit c306daf

Please sign in to comment.