From 3612926de5e9009a1fc82b61c9634d994fb9ed2e Mon Sep 17 00:00:00 2001 From: Julius Knorr Date: Thu, 16 Jan 2025 11:18:07 +0100 Subject: [PATCH] fix: Prefer mount owner over current user as owner of the storage Signed-off-by: Julius Knorr --- lib/Mount/GroupFolderStorage.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Mount/GroupFolderStorage.php b/lib/Mount/GroupFolderStorage.php index b9923138e..c8ca119fb 100644 --- a/lib/Mount/GroupFolderStorage.php +++ b/lib/Mount/GroupFolderStorage.php @@ -39,12 +39,16 @@ public function getFolderId(): int { } public function getOwner(string $path): string|false { + if ($this->mountOwner !== null) { + return $this->mountOwner->getUID(); + } + $user = $this->userSession->getUser(); if ($user !== null) { return $user->getUID(); } - return $this->mountOwner !== null ? $this->mountOwner->getUID() : false; + return false; } /**