Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-09-28 16:00:56 +0300
committerGitHub <noreply@github.com>2020-09-28 16:00:56 +0300
commit93dbaed5c3aba73d9aa51ec1326c733bb7556dd6 (patch)
tree62b95e8a7b789e0c41e8e68e22fad4565e7181ac /apps
parent26b1d3d9e401de29cf3bb62ba322db4650e35eb1 (diff)
parent3fe6b5b5f8709b2c989ae86480ae71d012263b03 (diff)
Merge pull request #23049 from nextcloud/backport/23034/stable19
[stable19] Fix numeric folders throwing on markDirty
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/CachingTree.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/CachingTree.php b/apps/dav/lib/Connector/Sabre/CachingTree.php
index 2d68025e3fa..e65b0d3b4d1 100644
--- a/apps/dav/lib/Connector/Sabre/CachingTree.php
+++ b/apps/dav/lib/Connector/Sabre/CachingTree.php
@@ -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]);
+ }
+ }
+ }
}