You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/01/28 17:12:42 UTC
[2/2] git commit: CB-5916: Android: Fix unfortunate NPE in config
check
CB-5916: Android: Fix unfortunate NPE in config check
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/b68e1278
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/b68e1278
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/b68e1278
Branch: refs/heads/dev
Commit: b68e1278d038716728ab83ae9543bb52f2c58e04
Parents: 28c21bf
Author: Ian Clelland <ic...@chromium.org>
Authored: Tue Jan 28 11:12:15 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Tue Jan 28 11:12:15 2014 -0500
----------------------------------------------------------------------
src/android/FileUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/b68e1278/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index f9a36a7..415d0e2 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -102,7 +102,7 @@ public class FileUtils extends CordovaPlugin {
String packageName = activity.getPackageName();
String location = activity.getIntent().getStringExtra("androidpersistentfilelocation");
- if (!(location.equalsIgnoreCase("internal") || location.equalsIgnoreCase("compatibility"))) {
+ if (location == null || !(location.equalsIgnoreCase("internal") || location.equalsIgnoreCase("compatibility"))) {
Log.e(LOG_TAG, "File plugin configuration error: Please set AndroidPersistentFileLocation in config.xml to one of \"internal\" (for new applications) or \"compatibility\" (for compatibility with previous versions)");
activity.finish();
}