Skip to content

Commit ba7a9c8

Browse files
committed
Gracefully handle smb acls for users without a domain
Signed-off-by: Richard Steinmetz <[email protected]>
1 parent 71109b7 commit ba7a9c8

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ protected function throwUnavailable(\Exception $e) {
219219
private function getACL(IFileInfo $file): ?ACL {
220220
$acls = $file->getAcls();
221221
foreach ($acls as $user => $acl) {
222-
[, $user] = explode('\\', $user); // strip domain
222+
$user = array_slice(explode('\\', $user), -1)[0]; // strip domain
223223
if ($user === $this->server->getAuth()->getUsername()) {
224224
return $acl;
225225
}

0 commit comments

Comments
 (0)