diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-09 10:29:46 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-09 10:29:46 +0200 |
commit | 0e3737ffe1061921e9975f8c4b557666ae90903b (patch) | |
tree | 56d10ca510c838bc4a26710d9e3e1cb7bcdbbd7f /lib/private/Files | |
parent | 355f50bd6c8ebb3e45768b6e53249e30998fe0d5 (diff) | |
parent | 808438efc0fc2383382509eed429182f7fb56541 (diff) | |
download | nextcloud-server-0e3737ffe1061921e9975f8c4b557666ae90903b.tar.gz nextcloud-server-0e3737ffe1061921e9975f8c4b557666ae90903b.zip |
Merge pull request #25028 from owncloud/scanner-user-not-setup
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.php | 7 |
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(); |