Skip to content

Commit 2fd5507

Browse files
authored
Merge pull request #17060 from nextcloud/backport/16985/stable17
[stable17] Properly initialize the CacheJail for sharing
2 parents 2883e7b + 98548b1 commit 2fd5507

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/files_sharing/lib/Cache.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ public function __construct($storage, ICacheEntry $sourceRootInfo) {
6767

6868
parent::__construct(
6969
null,
70-
null
70+
''
7171
);
7272
}
7373

7474
protected function getRoot() {
75-
if (is_null($this->root)) {
75+
if ($this->root === '') {
7676
$absoluteRoot = $this->sourceRootInfo->getPath();
7777

7878
// the sourceRootInfo path is the absolute path of the folder in the "real" storage
@@ -138,7 +138,7 @@ public function moveFromCache(\OCP\Files\Cache\ICache $sourceCache, $sourcePath,
138138

139139
protected function formatCacheEntry($entry, $path = null) {
140140
if (is_null($path)) {
141-
$path = isset($entry['path']) ? $entry['path'] : '';
141+
$path = $entry['path'] ?? '';
142142
$entry['path'] = $this->getJailedPath($path);
143143
} else {
144144
$entry['path'] = $path;

0 commit comments

Comments
 (0)