Skip to content
Snippets Groups Projects
Commit e2f87e45 authored by Victor Dubiniuk's avatar Victor Dubiniuk
Browse files

Calculate size for existing directories only

parent c8e02060
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment