mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #1516 from nextcloud/fix-openbasedir-realpath-warning
Only use realpath for real directories (#26058)
This commit is contained in:
commit
71fc9303c3
1 changed files with 6 additions and 1 deletions
|
|
@ -54,7 +54,12 @@ class Local extends \OC\Files\Storage\Common {
|
|||
throw new \InvalidArgumentException('No data directory set for local storage');
|
||||
}
|
||||
$this->datadir = $arguments['datadir'];
|
||||
$this->realDataDir = rtrim(realpath($this->datadir), '/') . '/';
|
||||
// some crazy code uses a local storage on root...
|
||||
if ($this->datadir === '/') {
|
||||
$this->realDataDir = $this->datadir;
|
||||
} else {
|
||||
$this->realDataDir = rtrim(realpath($this->datadir), '/') . '/';
|
||||
}
|
||||
if (substr($this->datadir, -1) !== '/') {
|
||||
$this->datadir .= '/';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue