[Android] Skip some system folders

Sébastien Toque git at videolan.org
Thu Aug 30 20:25:25 CEST 2012


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Thu Aug 30 20:24:59 2012 +0200| [dbf0d2784c39157aa055b5cf982f50903d09ce51] | committer: Sébastien Toque

Skip some system folders

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

 vlc-android/src/org/videolan/vlc/MediaLibrary.java |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index df66b77..60448ec 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -205,6 +205,10 @@ public class MediaLibrary {
                 String dirPath = dir.getAbsolutePath();
                 File[] f = null;
 
+                // Skip some system folders
+                if (dirPath.startsWith("/proc/") || dirPath.startsWith("/sys/") || dirPath.startsWith("/dev/"))
+                    continue;
+
                 // Do not scan again if same canonical path
                 try {
                     dirPath = dir.getCanonicalPath();



More information about the Android mailing list