]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correctly check for new default root 16985/head
authorJoas Schilling <coding@schilljs.com>
Wed, 4 Sep 2019 07:28:58 +0000 (09:28 +0200)
committerJoas Schilling <coding@schilljs.com>
Wed, 4 Sep 2019 07:28:58 +0000 (09:28 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/files_sharing/lib/Cache.php

index edd7ab3186f5d492f62f34fc7bf996de9fdac7bd..e50e1661447de3f077d298511003ce4f07f35c19 100644 (file)
@@ -67,12 +67,12 @@ class Cache extends CacheJail {
 
                parent::__construct(
                        null,
-                       ''      
+                       ''
                );
        }
 
        protected function getRoot() {
-               if (is_null($this->root)) {
+               if ($this->root === '') {
                        $absoluteRoot = $this->sourceRootInfo->getPath();
 
                        // the sourceRootInfo path is the absolute path of the folder in the "real" storage
@@ -138,7 +138,7 @@ class Cache extends CacheJail {
 
        protected function formatCacheEntry($entry, $path = null) {
                if (is_null($path)) {
-                       $path = isset($entry['path']) ? $entry['path'] : '';
+                       $path = $entry['path'] ?? '';
                        $entry['path'] = $this->getJailedPath($path);
                } else {
                        $entry['path'] = $path;