cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject [04/15] git commit: CB-5405: Use URL formatting for Entry.toURL
Date Fri, 13 Dec 2013 16:18:00 GMT
CB-5405: Use URL formatting for Entry.toURL


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/abf2c05d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/abf2c05d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/abf2c05d

Branch: refs/heads/android-file
Commit: abf2c05dde49ed525ddff3165de88676d2783e73
Parents: 2685ae6
Author: Ian Clelland <iclelland@chromium.org>
Authored: Sun Nov 24 22:43:59 2013 -0500
Committer: Ian Clelland <iclelland@chromium.org>
Committed: Wed Dec 11 09:57:57 2013 -0500

----------------------------------------------------------------------
 www/Entry.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/abf2c05d/www/Entry.js
----------------------------------------------------------------------
diff --git a/www/Entry.js b/www/Entry.js
index bb4d753..223e2bc 100644
--- a/www/Entry.js
+++ b/www/Entry.js
@@ -169,8 +169,11 @@ Entry.prototype.copyTo = function(parent, newName, successCallback, errorCallbac
  * Return a URL that can be used to identify this entry.
  */
 Entry.prototype.toURL = function() {
+    if (this.filesystem && this.filesystem.__format__) {
+      return this.filesystem.__format__(this.fullPath);
+    }
     // fullPath attribute contains the full URL
-    return this.fullPath;
+    return "file://localhost" + this.fullPath;
 };
 
 /**


Mime
View raw message