From 64c63bb00b855876694d141825b15b47d22b627e Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 3 Sep 2019 18:07:59 +0200 Subject: Properly initialize the CacheJail for sharing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/lib/Cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index bb1467ea827..edd7ab3186f 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -67,7 +67,7 @@ class Cache extends CacheJail { parent::__construct( null, - null + '' ); } -- cgit v1.2.3 From 70807a74c744ae0b613f8f9441ca663e391569de Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 4 Sep 2019 09:28:58 +0200 Subject: Correctly check for new default root Signed-off-by: Joas Schilling --- apps/files_sharing/lib/Cache.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php index edd7ab3186f..e50e1661447 100644 --- a/apps/files_sharing/lib/Cache.php +++ b/apps/files_sharing/lib/Cache.php @@ -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; -- cgit v1.2.3