diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 53140f29217..2a6121b663c 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -102,7 +102,12 @@ class CacheJail extends CacheWrapper { #[\Override] 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; }