fix: smb: don't fail hard if we can't load acls for a file

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/49288/head
Robin Appelman 2024-11-14 16:01:36 +07:00
parent 22e2419b28
commit cc39714fb5
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 6 additions and 1 deletions

@ -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()) {