mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #33603 from nextcloud/jail-search-post-24
[24] optimize search post-processing for jail wrapper
This commit is contained in:
commit
2d25bdac2a
1 changed files with 7 additions and 5 deletions
|
|
@ -324,11 +324,13 @@ class CacheJail extends CacheWrapper {
|
|||
}
|
||||
|
||||
public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry {
|
||||
$rawEntry = $this->getCache()->getCacheEntryFromSearchResult($rawEntry);
|
||||
if ($rawEntry) {
|
||||
$jailedPath = $this->getJailedPath($rawEntry->getPath());
|
||||
if ($jailedPath !== null) {
|
||||
return $this->formatCacheEntry(clone $rawEntry) ?: null;
|
||||
if ($this->getGetUnjailedRoot() === '' || strpos($rawEntry->getPath(), $this->getGetUnjailedRoot()) === 0) {
|
||||
$rawEntry = $this->getCache()->getCacheEntryFromSearchResult($rawEntry);
|
||||
if ($rawEntry) {
|
||||
$jailedPath = $this->getJailedPath($rawEntry->getPath());
|
||||
if ($jailedPath !== null) {
|
||||
return $this->formatCacheEntry(clone $rawEntry) ?: null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue