Skip to content

Commit 38e2936

Browse files
authored
Merge pull request #49651 from nextcloud/backport/49288/stable30
[stable30] fix: smb: don't fail hard if we can't load acls for a file
2 parents 26ba904 + f92de57 commit 38e2936

File tree

1 file changed

+6
-1
lines changed
  • apps/files_external/lib/Lib/Storage

1 file changed

+6
-1
lines changed

apps/files_external/lib/Lib/Storage/SMB.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ protected function throwUnavailable(\Exception $e) {
205205
* @return ACL|null
206206
*/
207207
private function getACL(IFileInfo $file): ?ACL {
208-
$acls = $file->getAcls();
208+
try {
209+
$acls = $file->getAcls();
210+
} catch (Exception $e) {
211+
$this->logger->error('Error while getting file acls', ['exception' => $e]);
212+
return null;
213+
}
209214
foreach ($acls as $user => $acl) {
210215
[, $user] = $this->splitUser($user); // strip domain
211216
if ($user === $this->server->getAuth()->getUsername()) {

0 commit comments

Comments
 (0)