summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-09-27 00:10:23 +0200
committerGitHub <noreply@github.com>2016-09-27 00:10:23 +0200
commit71fc9303c3e921c4c90fcaaed39715178b9f4360 (patch)
tree13961f4c24be4e5df39c661caaaef20e9dd94593 /lib/private
parenta43c680d9f0704e74a0642fc0be2699b4659ac6b (diff)
parent1f21a132c7a61770a8c54d55fa0789a011746cdf (diff)
downloadnextcloud-server-71fc9303c3e921c4c90fcaaed39715178b9f4360.tar.gz
nextcloud-server-71fc9303c3e921c4c90fcaaed39715178b9f4360.zip
Merge pull request #1516 from nextcloud/fix-openbasedir-realpath-warning
Only use realpath for real directories (#26058)
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Local.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 19674fc9413..0d63fd46ecc 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -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 .= '/';
}