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

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2024-11-14 16:01:36 +01:00
parent 22e2419b28
commit cc39714fb5
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

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