]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: smb: don't fail hard if we can't load acls for a file smb-acl-fail-soft 49288/head
authorRobin Appelman <robin@icewind.nl>
Thu, 14 Nov 2024 15:01:36 +0000 (16:01 +0100)
committerRobin Appelman <robin@icewind.nl>
Thu, 14 Nov 2024 15:01:36 +0000 (16:01 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_external/lib/Lib/Storage/SMB.php

index dd7f1ae8224f8a79206adc65ebab78cb9233ce8f..4483cfd1bdf85d4763e5dcd35c16af618c696588 100644 (file)
@@ -193,7 +193,12 @@ class SMB extends Common implements INotifyStorage {
         * 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()) {