diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java index 297219de..9334543c 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); }