incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bows...@apache.org
Subject [10/21] android commit: truncating file:// protocol where applicable in metadata func
Date Mon, 20 Feb 2012 21:01:00 GMT
truncating file:// protocol where applicable in metadata func


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/79ba28d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/79ba28d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/79ba28d6

Branch: refs/heads/master
Commit: 79ba28d6c4169f662e8cae907c86a4c378e03316
Parents: b4d1ca6
Author: Fil Maj <filip.maj@nitobi.com>
Authored: Thu Feb 16 17:21:03 2012 -0800
Committer: Joe Bowser <bowserj@apache.org>
Committed: Mon Feb 20 11:04:36 2012 -0800

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileUtils.java |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/79ba28d6/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 ec81fc7..3646be6 100755
--- a/framework/src/org/apache/cordova/FileUtils.java
+++ b/framework/src/org/apache/cordova/FileUtils.java
@@ -755,6 +755,9 @@ public class FileUtils extends Plugin {
      * @throws JSONException
      */
     private JSONObject getFileMetadata(String filePath) throws FileNotFoundException, JSONException
{
+        if (filePath.startsWith("file://")) {
+            filePath = filePath.substring(7);
+        }
         File file = new File(filePath);
 
         if (!file.exists()) {


Mime
View raw message