From f92de57ba0c2369ffe247da4ff7a029fa947da79 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Nov 2024 16:01:36 +0100 Subject: 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(-) (limited to 'apps') diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 8b367ca4511..a646345cc69 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -205,7 +205,12 @@ class SMB extends Common implements INotifyStorage { * @return ACL|null */ 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()) { -- cgit v1.2.3