Merge pull request #17061 from nextcloud/backport/16985/stable16
[stable16] Properly initialize the CacheJail for sharing
This commit is contained in:
commit
ad01cbfb78
|
@ -67,12 +67,12 @@ class Cache extends CacheJail {
|
||||||
|
|
||||||
parent::__construct(
|
parent::__construct(
|
||||||
null,
|
null,
|
||||||
null
|
''
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRoot() {
|
protected function getRoot() {
|
||||||
if (is_null($this->root)) {
|
if ($this->root === '') {
|
||||||
$absoluteRoot = $this->sourceRootInfo->getPath();
|
$absoluteRoot = $this->sourceRootInfo->getPath();
|
||||||
|
|
||||||
// the sourceRootInfo path is the absolute path of the folder in the "real" storage
|
// 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) {
|
protected function formatCacheEntry($entry, $path = null) {
|
||||||
if (is_null($path)) {
|
if (is_null($path)) {
|
||||||
$path = isset($entry['path']) ? $entry['path'] : '';
|
$path = $entry['path'] ?? '';
|
||||||
$entry['path'] = $this->getJailedPath($path);
|
$entry['path'] = $this->getJailedPath($path);
|
||||||
} else {
|
} else {
|
||||||
$entry['path'] = $path;
|
$entry['path'] = $path;
|
||||||
|
|
Loading…
Reference in New Issue