You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2012/08/14 19:51:43 UTC

android commit: CB-930: DirectoryReader creates null error code for inaccessible directory

Updated Branches:
  refs/heads/master 2dc0727e3 -> 6195b2c99


CB-930: DirectoryReader creates null error code for inaccessible directory


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/6195b2c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/6195b2c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/6195b2c9

Branch: refs/heads/master
Commit: 6195b2c99d874fa7b9db371783a6c42ab1965f04
Parents: 2dc0727
Author: macdonst <si...@gmail.com>
Authored: Tue Aug 14 13:50:59 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Tue Aug 14 13:50:59 2012 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileUtils.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/6195b2c9/framework/src/org/apache/cordova/FileUtils.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java
index 1dc6e05..ceb30ee 100755
--- a/framework/src/org/apache/cordova/FileUtils.java
+++ b/framework/src/org/apache/cordova/FileUtils.java
@@ -298,7 +298,9 @@ public class FileUtils extends Plugin {
         if (fp.isDirectory()) {
             File[] files = fp.listFiles();
             for (int i = 0; i < files.length; i++) {
-                entries.put(getEntry(files[i]));
+                if (files[i].canRead()) {
+                    entries.put(getEntry(files[i]));
+                }
             }
         }