diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 5b1d540b8c71..c425e9767a6a 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -49,9 +49,12 @@ public function __construct($cache, $root) { protected function getSourcePath($path) { if ($path === '') { return $this->root; - } else { - return $this->root . '/' . \ltrim($path, '/'); } + if ($this->root === '') { + return \ltrim($path, '/'); + } + + return $this->root . '/' . \ltrim($path, '/'); } /**