aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-02-18 23:48:08 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-02-18 23:48:08 +0300
commite2f87e456f05ecafeefff29a1e2bf996f692a050 (patch)
tree9111ff81f930fb7e12400cce6890f32a2aa8baff
parentc8e02060c1259760a18b9c9b0ac609088fd3015c (diff)
downloadnextcloud-server-e2f87e456f05ecafeefff29a1e2bf996f692a050.tar.gz
nextcloud-server-e2f87e456f05ecafeefff29a1e2bf996f692a050.zip
Calculate size for existing directories only
-rw-r--r--apps/files_trashbin/lib/trash.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php
index 76844ca92e9..fbc3954c040 100644
--- a/apps/files_trashbin/lib/trash.php
+++ b/apps/files_trashbin/lib/trash.php
@@ -396,6 +396,9 @@ class Trashbin {
*/
private static function calculateSize($view) {
$root = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath('');
+ if (!file_exists($root)) {
+ return 0;
+ }
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($root), \RecursiveIteratorIterator::CHILD_FIRST);
$size = 0;