You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/02/23 18:53:19 UTC

[34/35] git commit: tweaks to File APIs and error reporting in there

tweaks to File APIs and error reporting in there


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/5d5f0617
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/5d5f0617
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/5d5f0617

Branch: refs/heads/ios
Commit: 5d5f061793913cb1ee02cc15d12bef3bd183d123
Parents: 4c5cadd
Author: Fil Maj <fi...@nitobi.com>
Authored: Wed Feb 15 16:28:29 2012 -0800
Committer: Fil Maj <fi...@nitobi.com>
Committed: Wed Feb 15 16:28:29 2012 -0800

----------------------------------------------------------------------
 lib/plugin/ContactError.js              |    2 +-
 lib/plugin/DirectoryEntry.js            |    2 +-
 lib/plugin/resolveLocalFileSystemURI.js |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/5d5f0617/lib/plugin/ContactError.js
----------------------------------------------------------------------
diff --git a/lib/plugin/ContactError.js b/lib/plugin/ContactError.js
index 1487197..324a0cf 100644
--- a/lib/plugin/ContactError.js
+++ b/lib/plugin/ContactError.js
@@ -4,7 +4,7 @@
  * @constructor
  */
 var ContactError = function(err) {
-    this.code = err || null;
+    this.code = (typeof err != 'undefined' ? err : null);
 };
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/5d5f0617/lib/plugin/DirectoryEntry.js
----------------------------------------------------------------------
diff --git a/lib/plugin/DirectoryEntry.js b/lib/plugin/DirectoryEntry.js
index 901cd0a..01ffb7e 100644
--- a/lib/plugin/DirectoryEntry.js
+++ b/lib/plugin/DirectoryEntry.js
@@ -1,7 +1,7 @@
 var utils = require('cordova/utils'),
     exec = require('cordova/exec'),
     Entry = require('cordova/plugin/Entry'),
-    DirectoryReady = require('cordova/plugin/DirectoryReader');
+    DirectoryReader = require('cordova/plugin/DirectoryReader');
 
 /**
  * An interface representing a directory on the file system.

http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/5d5f0617/lib/plugin/resolveLocalFileSystemURI.js
----------------------------------------------------------------------
diff --git a/lib/plugin/resolveLocalFileSystemURI.js b/lib/plugin/resolveLocalFileSystemURI.js
index 417cd31..d90811a 100644
--- a/lib/plugin/resolveLocalFileSystemURI.js
+++ b/lib/plugin/resolveLocalFileSystemURI.js
@@ -25,7 +25,7 @@ module.exports = function(uri, successCallback, errorCallback) {
         } 
         else {
             // no Entry object returned
-            fail(FileError.NOT_FOUND_ERR);
+            fail(new FileError(FileError.NOT_FOUND_ERR));
         }
     };