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/03/27 03:35:43 UTC
android commit: Fix for CB-389: resolveLocalFileSystemURI does not
work on a resized image captured from Camera.getPicture()
Updated Branches:
refs/heads/master 1e2c38598 -> dfc86b1af
Fix for CB-389: resolveLocalFileSystemURI does not work on a resized image captured from Camera.getPicture()
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/dfc86b1a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/dfc86b1a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/dfc86b1a
Branch: refs/heads/master
Commit: dfc86b1af14e197206ab1ab4782df2f068caec72
Parents: 1e2c385
Author: macdonst <si...@gmail.com>
Authored: Mon Mar 26 21:35:34 2012 -0400
Committer: macdonst <si...@gmail.com>
Committed: Mon Mar 26 21:35:34 2012 -0400
----------------------------------------------------------------------
framework/src/org/apache/cordova/FileUtils.java | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/dfc86b1a/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 297219d..9334543 100755
--- a/framework/src/org/apache/cordova/FileUtils.java
+++ b/framework/src/org/apache/cordova/FileUtils.java
@@ -254,7 +254,12 @@ public class FileUtils extends Plugin {
URL testUrl = new URL(decoded);
if (decoded.startsWith("file://")) {
- fp = new File(decoded.substring(7, decoded.length()));
+ int questionMark = decoded.indexOf("?");
+ if (questionMark < 0) {
+ fp = new File(decoded.substring(7, decoded.length()));
+ } else {
+ fp = new File(decoded.substring(7, questionMark));
+ }
} else {
fp = new File(decoded);
}