diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 36d7002a26908..5ad48e26cc552 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1481,6 +1481,13 @@ public function getDirectoryContent($directory, $mimetype_filter = '', \OCP\File //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();