Merge pull request #1764 from owncloud/Undelete_directory_fix

Fix for Undelete directory action
This commit is contained in:
Lukas Reschke 2013-02-19 01:34:49 -08:00
commit 3d7545269b
1 changed files with 3 additions and 0 deletions

View File

@ -396,6 +396,9 @@ class Trashbin {
*/ */
private static function calculateSize($view) { private static function calculateSize($view) {
$root = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath(''); $root = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath('');
if (!file_exists($root)) {
return 0;
}
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($root), \RecursiveIteratorIterator::CHILD_FIRST); $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($root), \RecursiveIteratorIterator::CHILD_FIRST);
$size = 0; $size = 0;