diff options
author | Robin Appelman <robin@icewind.nl> | 2024-03-18 16:18:35 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-03-18 18:13:31 +0100 |
commit | afb589a69b1110aeaf8e24fa7650a6813cbe3f57 (patch) | |
tree | 16d8bd753697003bd4b70d77e0dc88b2ff606b6c /lib/private/Files/View.php | |
parent | 133a17aa96f3778a8c527cf096eb5a575df24e84 (diff) | |
download | nextcloud-server-afb589a69b1110aeaf8e24fa7650a6813cbe3f57.tar.gz nextcloud-server-afb589a69b1110aeaf8e24fa7650a6813cbe3f57.zip |
fix: ensure nested mount points are handled in the correct order
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r-- | lib/private/Files/View.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 36d7002a269..5ad48e26cc5 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1481,6 +1481,13 @@ class View { //add a folder for any mountpoint in this directory and add the sizes of other mountpoints to the folders $mounts = Filesystem::getMountManager()->findIn($path); + + // make sure nested mounts are sorted after their parent mounts + // otherwise doesn't propagate the etag across storage boundaries correctly + usort($mounts, function (IMountPoint $a, IMountPoint $b) { + return $a->getMountPoint() <=> $b->getMountPoint(); + }); + $dirLength = strlen($path); foreach ($mounts as $mount) { $mountPoint = $mount->getMountPoint(); |