Skip to content

Commit a6bcb10

Browse files
committed
fix: don't try to setup for a user when setting up /
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent d9d1d04 commit a6bcb10

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/private/Files/SetupManager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,10 @@ public function setupRoot(): void {
434434
* @param string $path
435435
* @return IUser|null
436436
*/
437-
private function getUserForPath(string $path) {
438-
if (str_starts_with($path, '/__groupfolders')) {
437+
private function getUserForPath(string $path): ?IUser {
438+
if ($path === '' || $path === '/') {
439+
return null;
440+
} elseif (str_starts_with($path, '/__groupfolders')) {
439441
return null;
440442
} elseif (substr_count($path, '/') < 2) {
441443
if ($user = $this->userSession->getUser()) {

0 commit comments

Comments
 (0)