Skip to content

Commit b899964

Browse files
authored
Merge pull request #12376 from nextcloud/backport/12284/stable13
[13] Properly search the root of a shared external storage
2 parents 204466c + 8b03bf7 commit b899964

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Files/Cache/Wrapper/CacheJail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected function formatCacheEntry($entry) {
9393

9494
protected function filterCacheEntry($entry) {
9595
$rootLength = strlen($this->getRoot()) + 1;
96-
return ($entry['path'] === $this->getRoot()) or (substr($entry['path'], 0, $rootLength) === $this->getRoot() . '/');
96+
return $rootLength === 1 || ($entry['path'] === $this->getRoot()) || (substr($entry['path'], 0, $rootLength) === $this->getRoot() . '/');
9797
}
9898

9999
/**

0 commit comments

Comments
 (0)