Skip to content

Commit

Permalink
Merge pull request #49288 from nextcloud/smb-acl-fail-soft
Browse files Browse the repository at this point in the history
fix: smb: don't fail hard if we can't load acls for a file
  • Loading branch information
icewind1991 authored Dec 4, 2024
2 parents 1ef3e3e + cc39714 commit 0e10bb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/files_external/lib/Lib/Storage/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,12 @@ protected function throwUnavailable(\Exception $e): never {
* 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()) {
Expand Down

0 comments on commit 0e10bb5

Please sign in to comment.