fix: don't try to setup for a user when setting up /

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2026-01-26 21:10:15 +01:00
parent d9d1d04e2e
commit a6bcb1075f
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -434,8 +434,10 @@ class SetupManager {
* @param string $path
* @return IUser|null
*/
private function getUserForPath(string $path) {
if (str_starts_with($path, '/__groupfolders')) {
private function getUserForPath(string $path): ?IUser {
if ($path === '' || $path === '/') {
return null;
} elseif (str_starts_with($path, '/__groupfolders')) {
return null;
} elseif (substr_count($path, '/') < 2) {
if ($user = $this->userSession->getUser()) {