Merge pull request #49288 from nextcloud/smb-acl-fail-soft

fix: smb: don't fail hard if we can't load acls for a file
pull/48793/head
Robin Appelman 2024-12-04 18:22:09 +07:00 committed by GitHub
commit 0e10bb59a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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()) {