Skip to content

Commit 3950ef8

Browse files
Merge pull request #57829 from nextcloud/setup-path-root
2 parents d56b241 + a6bcb10 commit 3950ef8

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)