[Android] DirectoryView: do not show hidden folders

Jean-Baptiste Kempf git at videolan.org
Sun Jun 24 22:21:08 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jun 24 22:20:36 2012 +0200| [dffe54eac7d14a444a22200c3592c515c1ebda22] | committer: Jean-Baptiste Kempf

DirectoryView: do not show hidden folders

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=dffe54eac7d14a444a22200c3592c515c1ebda22
---

 vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java b/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
index 55ce104..705b77e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/DirectoryAdapter.java
@@ -136,7 +136,7 @@ public class DirectoryAdapter extends BaseAdapter {
             for(int i = 0; i < files.size(); i++) {
                 String filename = files.get(i);
                 /* Avoid infinite loop */
-                if(filename.equals(".") || filename.equals("..")) continue;
+                if(filename.equals(".") || filename.equals("..") || filename.startsWith(".")) continue;
 
                 DirectoryAdapter.Node nss = new DirectoryAdapter.Node(filename);
                 nss.isFile = false;



More information about the Android mailing list