]> source.dussan.org Git - nextcloud-server.git/commitdiff
skip scanning for a user when the user is not setup yet
authorRobin Appelman <icewind@owncloud.com>
Wed, 8 Jun 2016 12:19:42 +0000 (14:19 +0200)
committerRobin Appelman <icewind@owncloud.com>
Wed, 8 Jun 2016 12:19:42 +0000 (14:19 +0200)
lib/private/Files/Utils/Scanner.php

index 9b55c312e268f9e38f0c247f31fbd8fefa030bbe..8beba116fe14f8361d16c11b831ccb6168a8b432 100644 (file)
@@ -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();