summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-01-14 23:39:31 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-01-14 23:39:31 +0100
commit44e5c052b3f4fdc352790aee982217a83f9449ef (patch)
tree83b48d0618f38a010e725f1580a472d362cc86f4 /lib/helper.php
parent53ca0db434f3ad8d043a0a9b76bd59f22af38f99 (diff)
downloadnextcloud-server-44e5c052b3f4fdc352790aee982217a83f9449ef.tar.gz
nextcloud-server-44e5c052b3f4fdc352790aee982217a83f9449ef.zip
handling proper display of files/folders with negative size
refs #1162
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index e7c9ac8015d..7f34d895821 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -223,6 +223,10 @@ class OC_Helper {
* Makes 2048 to 2 kB.
*/
public static function humanFileSize( $bytes ) {
+ if( $bytes < 0 ) {
+ $l = OC_L10N::get('lib');
+ return $l->t("couldn't be determined");
+ }
if( $bytes < 1024 ) {
return "$bytes B";
}