Merge pull request #31035 from paierlep/fix/occ_scan_no_files_error

Removes misleading error message in occ files:scan for new users.
This commit is contained in:
Vincent Petry 2022-02-10 18:07:21 +01:00 committed by GitHub
commit 787716613f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,7 +216,7 @@ 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('')) {
if ($storage->is_dir('files')) {
throw new ForbiddenException();
} else {// if the root exists in neither the cache nor the storage the user isn't setup yet
break;