Skip to content

Commit

Permalink
fix: in case root on CacheJail is an empty string we should not prefi…
Browse files Browse the repository at this point in the history
…x the path with a / (owncloud#40677)
  • Loading branch information
DeepDiver1975 authored Mar 31, 2023
1 parent d3dd378 commit 6e5a4cf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/private/Files/Cache/Wrapper/CacheJail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '/');
}

/**
Expand Down

0 comments on commit 6e5a4cf

Please sign in to comment.