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 2014/01/13 16:11:37 UTC

[5/6] git commit: Android: Properly format content urls

Android: Properly format content urls


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

Branch: refs/heads/dev
Commit: 73dbfb6c1f0b42b9825e08856b8da277f0b30450
Parents: 2a225e3
Author: Ian Clelland <ic...@chromium.org>
Authored: Sat Jan 11 09:58:08 2014 -0500
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jan 13 10:10:47 2014 -0500

----------------------------------------------------------------------
 www/android/FileSystem.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/73dbfb6c/www/android/FileSystem.js
----------------------------------------------------------------------
diff --git a/www/android/FileSystem.js b/www/android/FileSystem.js
index 2099a99..d0db194 100644
--- a/www/android/FileSystem.js
+++ b/www/android/FileSystem.js
@@ -23,6 +23,9 @@ FILESYSTEM_PROTOCOL = "filesystem";
 
 module.exports = {
     __format__: function(fullPath) {
+        if (this.name === 'content') {
+            return 'content:/' + encodeURI(fullPath);
+        }
         var path = ('/'+this.name+(fullPath[0]==='/'?'':'/')+encodeURI(fullPath)).replace('//','/');
         return FILESYSTEM_PROTOCOL + '://localhost' + path;
     }