From 1b85f40cbeb339fb198fd7a7a1203d614fcb77cd Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 18 Nov 2014 17:14:26 +0100 Subject: [PATCH] $file only contains the filename and not the absolute path, that means that files in a subdirectory will not get properly resolved and an empty filesize is returned. This feature only exists on master. --- apps/files_sharing/lib/controllers/sharecontroller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index a3d5b6d44a..e5fd0f401c 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -173,7 +173,7 @@ class ShareController extends Controller { $shareTmpl['server2serversharing'] = Helper::isOutgoingServer2serverShareEnabled(); $shareTmpl['protected'] = isset($linkItem['share_with']) ? 'true' : 'false'; $shareTmpl['dir'] = $dir; - $shareTmpl['fileSize'] = \OCP\Util::humanFileSize(\OC\Files\Filesystem::filesize($file)); + $shareTmpl['fileSize'] = \OCP\Util::humanFileSize(\OC\Files\Filesystem::filesize($originalSharePath)); // Show file list if (Filesystem::is_dir($originalSharePath)) {