Skip to content

Commit 1d5e0c6

Browse files
Merge pull request #58452 from nextcloud/backport/58419/stable31
2 parents 518d8f8 + add8625 commit 1d5e0c6

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

lib/private/Files/Cache/Propagator.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,14 @@ public function propagateChange($internalPath, $time, $sizeDifference = 0) {
6969
$storageId = $this->storage->getStorageCache()->getNumericId();
7070

7171
$parents = $this->getParents($internalPath);
72-
if ($this->storage->instanceOfStorage(LocalRootStorage::class) && str_starts_with($internalPath, '__groupfolders')) {
73-
// Remove '' and '__groupfolders'
74-
$parents = array_slice($parents, 2);
72+
if ($this->storage->instanceOfStorage(LocalRootStorage::class)) {
73+
if (str_starts_with($internalPath, '__groupfolders/versions') || str_starts_with($internalPath, '__groupfolders/trash')) {
74+
// Remove '', '__groupfolders' and '__groupfolders/versions' or '__groupfolders/trash'
75+
$parents = array_slice($parents, 3);
76+
} elseif (str_starts_with($internalPath, '__groupfolders')) {
77+
// Remove '' and '__groupfolders'
78+
$parents = array_slice($parents, 2);
79+
}
7580
}
7681

7782
if ($this->inBatch) {

0 commit comments

Comments
 (0)