diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index c2b5e08f1e4a4..136ab70688589 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -134,7 +134,11 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) { protected function formatCacheEntry($entry, $path = null) { if (is_null($path)) { $path = $entry['path'] ?? ''; - $entry['path'] = $this->getJailedPath($path); + $jailedPath = $this->getJailedPath($path); + if ($jailedPath === null) { + return false; + } + $entry['path'] = $jailedPath; } else { $entry['path'] = $path; }