cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an-s...@apache.org
Subject git commit: CB-7413 Resolve 'ms-appdata' URIs with File plugin
Date Thu, 11 Sep 2014 11:30:54 GMT
Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master 986bf6fd3 -> 05da230c2


CB-7413 Resolve 'ms-appdata' URIs with File plugin

+ typo fix in data URI check


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

Branch: refs/heads/master
Commit: 05da230c2a76c3f698d7efd6b84900bcc939edd1
Parents: 986bf6f
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Thu Sep 11 13:55:53 2014 +0400
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Thu Sep 11 13:55:53 2014 +0400

----------------------------------------------------------------------
 tests/tests.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/05da230c/tests/tests.js
----------------------------------------------------------------------
diff --git a/tests/tests.js b/tests/tests.js
index f9c570d..e2ffa9f 100644
--- a/tests/tests.js
+++ b/tests/tests.js
@@ -141,12 +141,12 @@ exports.defineManualTests = function (contentEl, createActionButton)
{
     function getPictureWin(data) {
         setPicture(data);
         // TODO: Fix resolveLocalFileSystemURI to work with native-uri.
-        if (pictureUrl.indexOf('file:') == 0 || pictureUrl.indexOf('content:') == 0) {
+        if (pictureUrl.indexOf('file:') == 0 || pictureUrl.indexOf('content:') == 0 || pictureUrl.indexOf('ms-appdata:')
=== 0) {
             resolveLocalFileSystemURI(data, function (e) {
                 fileEntry = e;
                 logCallback('resolveLocalFileSystemURI()', true)(e.toURL());
             }, logCallback('resolveLocalFileSystemURI()', false));
-        } else if (pictureUrl.indexOf('data:image/jpeg;base64' == 0)) {
+        } else if (pictureUrl.indexOf('data:image/jpeg;base64') == 0) {
             // do nothing
         } else {
             var path = pictureUrl.replace(/^file:\/\/(localhost)?/, '').replace(/%20/g, '
');


Mime
View raw message