Skip to content

Commit

Permalink
Merge pull request #49651 from nextcloud/backport/49288/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: smb: don't fail hard if we can't load acls for a file
  • Loading branch information
skjnldsv authored Dec 12, 2024
2 parents 26ba904 + f92de57 commit 38e2936
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 @@ -205,7 +205,12 @@ protected function throwUnavailable(\Exception $e) {
* @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()) {
Expand Down

0 comments on commit 38e2936

Please sign in to comment.