diff options
author | Robin Appelman <robin@icewind.nl> | 2024-03-18 16:18:35 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-03-18 18:03:24 +0000 |
commit | e286622d0b5dbb7e15a0934c77cbf5f926d9d799 (patch) | |
tree | 9bb8e73ce6a87a5cb4cb2323ccafa740e2f83544 /lib/private/Files | |
parent | 71861831403a1da8b2dbfd6195f1d5694038610e (diff) | |
download | nextcloud-server-e286622d0b5dbb7e15a0934c77cbf5f926d9d799.tar.gz nextcloud-server-e286622d0b5dbb7e15a0934c77cbf5f926d9d799.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')
-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 6eefb093795..1d8125febbb 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1475,6 +1475,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(); |