You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2013/12/13 17:18:44 UTC

[02/19] git commit: CB-5405: Use URL formatting for Entry.toURL

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/cd7d925d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/cd7d925d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/cd7d925d

Branch: refs/heads/dev
Commit: cd7d925d05f1387293bb3075dd7b32c4254cece9
Parents: 7872b9c
Author: Ian Clelland <ic...@chromium.org>
Authored: Sun Nov 24 22:43:59 2013 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Fri Dec 13 10:55:50 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/cd7d925d/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;
 };
 
 /**