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/04/23 20:57:13 UTC

[17/37] git commit: CB-5959 size is explicitly 0 if not set, file.spec.46&47 are testing the type of size

CB-5959 size is explicitly 0 if not set, file.spec.46&47 are testing the type of size


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

Branch: refs/heads/master
Commit: f84a35f44eb77986b06655c45167af7c31c1d8d1
Parents: d9189f9
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Mon Mar 24 17:24:16 2014 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Mon Mar 24 17:24:16 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/f84a35f4/www/Metadata.js
----------------------------------------------------------------------
diff --git a/www/Metadata.js b/www/Metadata.js
index dadae7e..f95c44c 100644
--- a/www/Metadata.js
+++ b/www/Metadata.js
@@ -27,10 +27,10 @@
 var Metadata = function(metadata) {
     if (typeof metadata == "object") {
         this.modificationTime = new Date(metadata.modificationTime);
-        this.size = +(metadata.size);
+        this.size = metadata.size || 0;
     } else if (typeof metadata == "undefined") {
         this.modificationTime = null;
-        this.size = null;
+        this.size = 0;
     } else {
         /* Backwards compatiblity with platforms that only return a timestamp */
         this.modificationTime = new Date(metadata);