Merge pull request #12284 from nextcloud/fix/1020/search_shared_external

Properly search the root of a shared external storage
This commit is contained in:
Morris Jobke 2018-11-06 18:16:12 +01:00 committed by GitHub
commit add35c7f31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ class CacheJail extends CacheWrapper {
protected function filterCacheEntry($entry) {
$rootLength = strlen($this->getRoot()) + 1;
return ($entry['path'] === $this->getRoot()) or (substr($entry['path'], 0, $rootLength) === $this->getRoot() . '/');
return $rootLength === 1 || ($entry['path'] === $this->getRoot()) || (substr($entry['path'], 0, $rootLength) === $this->getRoot() . '/');
}
/**