From 56c0384044b85d15761be8937f36c85e19307b5a Mon Sep 17 00:00:00 2001 From: 1 Man Projects Date: Sat, 15 Jul 2017 20:18:45 +0200 Subject: [PATCH 1/2] Removed cast to integer in getSize Fixes - Wrong or no sizes of files/folders #5031 --- lib/private/Files/FileInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index e1b5bf983c..1b1b76deda 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -193,7 +193,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { */ public function getSize() { $this->updateEntryfromSubMounts(); - return isset($this->data['size']) ? (int) $this->data['size'] : 0; + return isset($this->data['size']) ? $this->data['size'] : 0; } /** From 3e5d590f1e40dcccaf0167a37ba7bb1afff1bfe9 Mon Sep 17 00:00:00 2001 From: 1 Man Projects Date: Mon, 17 Jul 2017 15:19:04 +0200 Subject: [PATCH 2/2] changed direct cast to integer to numerical value --- lib/private/Files/FileInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php index 1b1b76deda..f5a44ba02e 100644 --- a/lib/private/Files/FileInfo.php +++ b/lib/private/Files/FileInfo.php @@ -193,7 +193,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess { */ public function getSize() { $this->updateEntryfromSubMounts(); - return isset($this->data['size']) ? $this->data['size'] : 0; + return isset($this->data['size']) ? 0 + $this->data['size'] : 0; } /**