mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
Fix for CB-389: resolveLocalFileSystemURI does not work on a resized image captured from Camera.getPicture()
This commit is contained in:
parent
1e2c38598f
commit
dfc86b1af1
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user