From cc39714fb59aeaea74fa873820fca5d499d17c06 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Nov 2024 16:01:36 +0100 Subject: [PATCH] fix: smb: don't fail hard if we can't load acls for a file Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/SMB.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index dd7f1ae8224f8..4483cfd1bdf85 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -193,7 +193,12 @@ protected function throwUnavailable(\Exception $e): never { * get the acl from fileinfo that is relevant for the configured user */ private function getACL(IFileInfo $file): ?ACL { - $acls = $file->getAcls(); + try { + $acls = $file->getAcls(); + } catch (Exception $e) { + $this->logger->error('Error while getting file acls', ['exception' => $e]); + return null; + } foreach ($acls as $user => $acl) { [, $user] = $this->splitUser($user); // strip domain if ($user === $this->server->getAuth()->getUsername()) {