Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions core/Command/Info/FileUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ public function getFilesByUser(FileInfo $file): array {

$mounts = $this->userMountCache->getMountsForFileId($id);
$result = [];
foreach ($mounts as $mount) {
if (isset($result[$mount->getUser()->getUID()])) {
continue;
}

$userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID());
$result[$mount->getUser()->getUID()] = $userFolder->getById($id);
foreach ($mounts as $cachedMount) {
$mount = $this->rootFolder->getMount($cachedMount->getMountPoint());
$cache = $mount->getStorage()->getCache();
$cacheEntry = $cache->get($id);
$node = $this->rootFolder->getNodeFromCacheEntryAndMount($cacheEntry, $mount);
$result[$cachedMount->getUser()->getUID()][] = $node;
}

return $result;
Expand Down
4 changes: 2 additions & 2 deletions lib/private/Files/Node/Root.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,9 @@ public function getNodeFromCacheEntryAndMount(ICacheEntry $cacheEntry, IMountPoi
$isDir = $info->getType() === FileInfo::TYPE_FOLDER;
$view = new View('');
if ($isDir) {
return new Folder($this, $view, $path, $info, $parent);
return new Folder($this, $view, $fullPath, $info, $parent);
} else {
return new File($this, $view, $path, $info, $parent);
return new File($this, $view, $fullPath, $info, $parent);
}
}
}
Loading