diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-06 18:16:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-06 18:16:12 +0100 |
commit | add35c7f3100b5aa37268dbebbe619f4b0c9109b (patch) | |
tree | edbe6e351f063f1a75b332f7883c801c162a46d8 /lib | |
parent | e03bc6e4c9606602f8c753e14081b2fb1605b947 (diff) | |
parent | 0277cd7158fe8460268188a8c05cd839b53a1d20 (diff) | |
download | nextcloud-server-add35c7f3100b5aa37268dbebbe619f4b0c9109b.tar.gz nextcloud-server-add35c7f3100b5aa37268dbebbe619f4b0c9109b.zip |
Merge pull request #12284 from nextcloud/fix/1020/search_shared_external
Properly search the root of a shared external storage
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 75df45e257b..57f58e7d839 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -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() . '/'); } /** |