Skip to content

Commit deddcbd

Browse files
Merge pull request #23034 from nextcloud/bugfix/noid/numeric-folders-thorw-on-mark-dirty
Fix numeric folders throwing on markDirty
2 parents 8c168e7 + 6db5f53 commit deddcbd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apps/dav/lib/Connector/Sabre/CachingTree.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,16 @@ public function cacheNode(Node $node, $path = null) {
3838
}
3939
$this->cache[trim($path, '/')] = $node;
4040
}
41+
42+
public function markDirty($path) {
43+
// We don't care enough about sub-paths
44+
// flushing the entire cache
45+
$path = trim($path, '/');
46+
foreach ($this->cache as $nodePath => $node) {
47+
$nodePath = (string) $nodePath;
48+
if ('' === $path || $nodePath == $path || 0 === strpos($nodePath, $path.'/')) {
49+
unset($this->cache[$nodePath]);
50+
}
51+
}
52+
}
4153
}

0 commit comments

Comments
 (0)