You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2012/08/16 00:25:51 UTC
[2/3] js commit: [CB-1233] - more passing tests for file transfer
[CB-1233] - more passing tests for file transfer
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/a637a783
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/a637a783
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/a637a783
Branch: refs/heads/master
Commit: a637a7837d8f5c5b9cc5bd50c5b01154ec581fd8
Parents: d59fe9a
Author: Tim Kim <ti...@nitobi.com>
Authored: Tue Aug 14 17:23:01 2012 -0700
Committer: Tim Kim <ti...@nitobi.com>
Committed: Wed Aug 15 15:24:57 2012 -0700
----------------------------------------------------------------------
.../plugin/playbook/resolveLocalFileSystemURI.js | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a637a783/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
----------------------------------------------------------------------
diff --git a/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js b/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
index b9f3ef3..55758cc 100644
--- a/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
+++ b/lib/playbook/plugin/playbook/resolveLocalFileSystemURI.js
@@ -34,9 +34,15 @@ module.exports = function(uri, successCallback, errorCallback) {
else {
// no Entry object returned
fail(FileError.NOT_FOUND_ERR);
+ return;
}
};
+ if(!uri || uri === ""){
+ fail(FileError.NOT_FOUND_ERR);
+ return;
+ }
+
// decode uri if % char found
if(uri.indexOf('%')>=0){
uri = decodeURI(uri);
@@ -66,8 +72,10 @@ module.exports = function(uri, successCallback, errorCallback) {
theEntry.name = uri.split('/').pop();
theEntry.fullPath = uri;
success(theEntry);
+ return;
}else{
fail(FileError.NOT_FOUND_ERR);
+ return;
}
};