skip scanning for a user when the user is not setup yet

This commit is contained in:
Robin Appelman 2016-06-09 11:37:02 +02:00 committed by Vincent Petry
parent 7f3f06cdd9
commit d46cb39e3c
No known key found for this signature in database
GPG Key ID: AF8F9EFC56562186
1 changed files with 6 additions and 1 deletions

View File

@ -148,7 +148,12 @@ class Scanner extends PublicEmitter {
if ($storage->instanceOfStorage('\OC\Files\Storage\Home') and
(!$storage->isCreatable('') or !$storage->isCreatable('files'))
) {
if ($storage->file_exists('') or $storage->getCache()->inCache('')) {
throw new ForbiddenException();
} else {// if the root exists in neither the cache nor the storage the user isn't setup yet
break;
}
}
$relativePath = $mount->getInternalPath($dir);
$scanner = $storage->getScanner();