diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index fe597344d395c..2b732ff377f70 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -92,7 +92,12 @@ protected function getJailedPath(string $path, ?string $root = null) { protected function formatCacheEntry($entry) { if (isset($entry['path'])) { - $entry['path'] = $this->getJailedPath($entry['path']); + $jailedPath = $this->getJailedPath($entry['path']); + if ($jailedPath !== null) { + $entry['path'] = $jailedPath; + } else { + return false; + } } return $entry; }