Browse Source
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
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
1 deletions
-
apps/files_external/lib/Lib/Storage/SMB.php
|
|
@ -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()) { |
|
|
|