Skip to content

Commit 2119a18

Browse files
icewind1991backportbot[bot]
authored andcommitted
fix: ensure nested mount points are handled in the correct order
Signed-off-by: Robin Appelman <[email protected]>
1 parent d69f7e9 commit 2119a18

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/private/Files/View.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,13 @@ public function getDirectoryContent($directory, $mimetype_filter = '', \OCP\File
15141514

15151515
//add a folder for any mountpoint in this directory and add the sizes of other mountpoints to the folders
15161516
$mounts = Filesystem::getMountManager()->findIn($path);
1517+
1518+
// make sure nested mounts are sorted after their parent mounts
1519+
// otherwise doesn't propagate the etag across storage boundaries correctly
1520+
usort($mounts, function (IMountPoint $a, IMountPoint $b) {
1521+
return $a->getMountPoint() <=> $b->getMountPoint();
1522+
});
1523+
15171524
$dirLength = strlen($path);
15181525
foreach ($mounts as $mount) {
15191526
$mountPoint = $mount->getMountPoint();

0 commit comments

Comments
 (0)