incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From macdo...@apache.org
Subject android commit: CB-930: DirectoryReader creates null error code for inaccessible directory
Date Tue, 14 Aug 2012 17:51:43 GMT
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 <simon.macdonald@gmail.com>
Authored: Tue Aug 14 13:50:59 2012 -0400
Committer: macdonst <simon.macdonald@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]));
+                }
             }
         }
 


Mime
View raw message