cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject git commit: CB-5959 size is explicitly 0 if not set, file.spec.46&47 are testing the type of size
Date Tue, 25 Mar 2014 00:24:44 GMT
Repository: cordova-plugin-file
Updated Branches:
  refs/heads/dev d9189f96e -> f84a35f44


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/dev
Commit: f84a35f44eb77986b06655c45167af7c31c1d8d1
Parents: d9189f9
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Mon Mar 24 17:24:16 2014 -0700
Committer: Jesse MacFadyen <purplecabbage@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);


Mime
View raw message