You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2014/06/16 23:28:39 UTC

[3/3] git commit: CB-6940: Fixing up commit from dzeims

CB-6940: Fixing up commit from dzeims


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/cbcd0f46
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/cbcd0f46
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/cbcd0f46

Branch: refs/heads/master
Commit: cbcd0f461d676df876e4be19e20a4c80b0e2d6de
Parents: 44fe040
Author: Joe Bowser <bo...@apache.org>
Authored: Mon Jun 16 14:28:10 2014 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Mon Jun 16 14:28:10 2014 -0700

----------------------------------------------------------------------
 src/android/FileUtils.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/cbcd0f46/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index db8f4d4..d1d0f81 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -138,8 +138,8 @@ public class FileUtils extends CordovaPlugin {
             availableFileSystems.put("sdcard", Environment.getExternalStorageDirectory().getAbsolutePath());
             availableFileSystems.put("cache-external", context.getExternalCacheDir().getAbsolutePath());
           }
-          catch(IOException e) {
-            /* If external storage is unavailable, context.getExternal* returns null */
+          catch(NullPointerException e) {
+              Log.d(LOG_TAG, "External storage unavailable, check to see if USB Mass Storage Mode is on");
           }
         }
 
@@ -877,8 +877,9 @@ public class FileUtils extends CordovaPlugin {
             ret.put("externalCacheDirectory", toDirUrl(context.getExternalCacheDir()));
             ret.put("externalRootDirectory", toDirUrl(Environment.getExternalStorageDirectory()));
           }
-          catch(IOException e) {
+          catch(NullPointerException e) {
             /* If external storage is unavailable, context.getExternal* returns null */
+              Log.d(LOG_TAG, "Unable to access these paths, most liklely due to USB storage");
           }
         }
         return ret;