summaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-06-08 14:19:42 +0200
committerRobin Appelman <icewind@owncloud.com>2016-06-08 14:19:42 +0200
commit808438efc0fc2383382509eed429182f7fb56541 (patch)
tree85a1f9f9ee8fb358b226e23b254660be2498e7aa /lib/private/Files
parent46fe2ddf2e7a4413586095143521684a0377daad (diff)
downloadnextcloud-server-808438efc0fc2383382509eed429182f7fb56541.tar.gz
nextcloud-server-808438efc0fc2383382509eed429182f7fb56541.zip
skip scanning for a user when the user is not setup yet
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Utils/Scanner.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index 9b55c312e26..8beba116fe1 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -160,7 +160,12 @@ class Scanner extends PublicEmitter {
if ($storage->instanceOfStorage('\OC\Files\Storage\Home') and
(!$storage->isCreatable('') or !$storage->isCreatable('files'))
) {
- throw new ForbiddenException();
+ 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();