diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-04-25 12:44:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 12:44:26 +0300 |
commit | e693781c2144c052a761788facbd6866b2331a39 (patch) | |
tree | 642eaadb184d73328082ef9feeec0340d160091e /lib/private | |
parent | 9718254285ab4aa35c09ba21cd2754e2fc97ff9d (diff) | |
parent | 9f0ba3adc223987125c49367b4eeb7558b16e367 (diff) |
Merge pull request #32079 from nextcloud/directory-listing-optimize-add-submount
optimize adding submount info to directory content
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Files/View.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 30dc5518be8..e49dc766c88 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1517,10 +1517,8 @@ class View { if ($pos = strpos($relativePath, '/')) { //mountpoint inside subfolder add size to the correct folder $entryName = substr($relativePath, 0, $pos); - foreach ($files as &$entry) { - if ($entry->getName() === $entryName) { - $entry->addSubEntry($rootEntry, $mountPoint); - } + if (isset($files[$entryName])) { + $files[$entryName]->addSubEntry($rootEntry, $mountPoint); } } else { //mountpoint in this folder, add an entry for it $rootEntry['name'] = $relativePath; |