[Pkg-owncloud-commits] [owncloud] 38/394: backport NAN undefined fix for total file size
David Prévot
taffit at alioth.debian.org
Fri Nov 8 23:11:22 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v4.5.10
in repository owncloud.
commit bfd53c5bd733a7836d16eaba66b2d0c9e328ef82
Author: Jörn Friedrich Dreyer <jfd at butonic.de>
Date: Tue Nov 6 12:40:22 2012 +0100
backport NAN undefined fix for total file size
---
core/js/js.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/js/js.js b/core/js/js.js
index 9a7da67..de24995 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -628,7 +628,7 @@ $.fn.filterAttr = function(attr_name, attr_value) {
function humanFileSize(size) {
var humanList = ['B', 'kB', 'MB', 'GB', 'TB'];
// Calculate Log with base 1024: size = 1024 ** order
- var order = Math.floor(Math.log(size) / Math.log(1024));
+ var order = size?Math.floor(Math.log(size) / Math.log(1024)):0;
// Stay in range of the byte sizes that are defined
order = Math.min(humanList.length - 1, order);
var readableFormat = humanList[order];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list