diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2020-09-25 14:52:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 14:52:46 +0200 |
commit | deddcbd8175a2de604488c43586ec05358199f8c (patch) | |
tree | e567a825122c3a779077bc630f07c7cde70d4e93 /apps/dav | |
parent | 8c168e7ba90cdd935898dd8afbc54887f2ce0d92 (diff) | |
parent | 6db5f53bc6be489ddea35a8da53280136699bbe1 (diff) | |
download | nextcloud-server-deddcbd8175a2de604488c43586ec05358199f8c.tar.gz nextcloud-server-deddcbd8175a2de604488c43586ec05358199f8c.zip |
Merge pull request #23034 from nextcloud/bugfix/noid/numeric-folders-thorw-on-mark-dirty
Fix numeric folders throwing on markDirty
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/CachingTree.php | 12 |
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]); + } + } + } } |