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 committed by backportbot[bot]
parent 5b8c2d62f1
commit f92de57ba0

View file

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