Skip to content

Commit 50e2398

Browse files
committed
Use isset instead and add a comment
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent fbd374d commit 50e2398

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/FilesHooks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,8 @@ protected function getUserPathsFromPath($path, $uidOwner) {
619619
$sections = explode('/', $path, 4);
620620

621621
$accessList['ownerPath'] = '/';
622-
if (count($sections) === 4) {
622+
if (isset($sections[3])) {
623+
// Not the case when a file in root is renamed
623624
$accessList['ownerPath'] .= $sections[3];
624625
}
625626

0 commit comments

Comments
 (0)