Browse Source

Merge pull request #23034 from nextcloud/bugfix/noid/numeric-folders-thorw-on-mark-dirty

Fix numeric folders throwing on markDirty
tags/v21.0.0beta1
Joas Schilling 3 years ago
parent
commit
deddcbd817
No account linked to committer's email address
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      apps/dav/lib/Connector/Sabre/CachingTree.php

+ 12
- 0
apps/dav/lib/Connector/Sabre/CachingTree.php View File

@@ -38,4 +38,16 @@ class CachingTree extends Tree {
}
$this->cache[trim($path, '/')] = $node;
}

public function markDirty($path) {
// We don't care enough about sub-paths
// flushing the entire cache
$path = trim($path, '/');
foreach ($this->cache as $nodePath => $node) {
$nodePath = (string) $nodePath;
if ('' === $path || $nodePath == $path || 0 === strpos($nodePath, $path.'/')) {
unset($this->cache[$nodePath]);
}
}
}
}

Loading…
Cancel
Save