Fix for CB-389: resolveLocalFileSystemURI does not work on a resized image captured from Camera.getPicture()

This commit is contained in:
macdonst 2012-03-26 21:35:34 -04:00
parent 1e2c38598f
commit dfc86b1af1

View File

@ -254,7 +254,12 @@ public class FileUtils extends Plugin {
URL testUrl = new URL(decoded); URL testUrl = new URL(decoded);
if (decoded.startsWith("file://")) { 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 { } else {
fp = new File(decoded); fp = new File(decoded);
} }