Merge pull request #58419 from nextcloud/fix/propagator/skip-groupfolders-versions-trash

fix(Propagator): Also skip groupfolders versions and trash entries
pull/58360/head
Kate 3 months ago committed by GitHub
commit ea9e2bb161
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      lib/private/Files/Cache/Propagator.php

@ -52,9 +52,14 @@ class Propagator implements IPropagator {
$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) {

Loading…
Cancel
Save