diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-09 14:52:44 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-09 14:52:44 +0200 |
commit | 05870bb659f41c8d61b0b559a691e351d618289d (patch) | |
tree | ba4e22699cd7ea21eea4b2adfadb28efa08493a2 | |
parent | 7f3f06cdd9f6ae8c27a96bd5bfd81482c404c511 (diff) | |
parent | d46cb39e3c7322cf67f98a365943092c1875eff0 (diff) | |
download | nextcloud-server-05870bb659f41c8d61b0b559a691e351d618289d.tar.gz nextcloud-server-05870bb659f41c8d61b0b559a691e351d618289d.zip |
Merge pull request #25044 from owncloud/stable9-scanner-user-not-setup
[stable9] skip scanning for a user when the user is not setup yet
-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 f05805fe94a..cf85ff4c997 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -148,7 +148,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(); |