diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index f9042fc076569..beba9b5724500 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -124,7 +124,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; }