diff options
author | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-02-18 23:48:08 +0300 |
---|---|---|
committer | Victor Dubiniuk <victor.dubiniuk@gmail.com> | 2013-02-18 23:48:08 +0300 |
commit | e2f87e456f05ecafeefff29a1e2bf996f692a050 (patch) | |
tree | 9111ff81f930fb7e12400cce6890f32a2aa8baff | |
parent | c8e02060c1259760a18b9c9b0ac609088fd3015c (diff) | |
download | nextcloud-server-e2f87e456f05ecafeefff29a1e2bf996f692a050.tar.gz nextcloud-server-e2f87e456f05ecafeefff29a1e2bf996f692a050.zip |
Calculate size for existing directories only
-rw-r--r-- | apps/files_trashbin/lib/trash.php | 3 |
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;
|