mirror of
https://github.com/nextcloud/server.git
synced 2024-08-13 14:11:10 +02:00
Calculate size for existing directories only
This commit is contained in:
parent
c8e02060c1
commit
e2f87e456f
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user