diff --git a/lib/private/Files/Cache/Propagator.php b/lib/private/Files/Cache/Propagator.php index bffdfbe72bb09..559855da52c95 100644 --- a/lib/private/Files/Cache/Propagator.php +++ b/lib/private/Files/Cache/Propagator.php @@ -52,9 +52,14 @@ public function propagateChange(string $internalPath, int $time, int $sizeDiffer $storageId = $this->storage->getCache()->getNumericStorageId(); $parents = $this->getParents($internalPath); - if ($this->storage->instanceOfStorage(LocalRootStorage::class) && str_starts_with($internalPath, '__groupfolders')) { - // Remove '' and '__groupfolders' - $parents = array_slice($parents, 2); + if ($this->storage->instanceOfStorage(LocalRootStorage::class)) { + if (str_starts_with($internalPath, '__groupfolders/versions') || str_starts_with($internalPath, '__groupfolders/trash')) { + // Remove '', '__groupfolders' and '__groupfolders/versions' or '__groupfolders/trash' + $parents = array_slice($parents, 3); + } elseif (str_starts_with($internalPath, '__groupfolders')) { + // Remove '' and '__groupfolders' + $parents = array_slice($parents, 2); + } } if ($this->inBatch) {