summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2015-02-04 14:44:02 +0100
committerBjörn Schießle <bjoern@schiessle.org>2015-02-04 14:44:02 +0100
commit486f49ed72970276462f09074829576588352b2a (patch)
tree0307ef2b0eecd51844b60981c04665be664e96bd /lib
parent09216ef49b04f2a37d853d160853d15741bbe015 (diff)
parent21c45925fe11cac27cf61958a0c0863313afbdb2 (diff)
downloadnextcloud-server-486f49ed72970276462f09074829576588352b2a.tar.gz
nextcloud-server-486f49ed72970276462f09074829576588352b2a.zip
Merge pull request #13881 from owncloud/upload_to_root_of_mountpoint
detect root of mountpoint also if the trailing slash is missed
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/view.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 6c720a6f5c0..3bc9fdff1ee 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -87,6 +87,11 @@ class View {
if ($this->fakeRoot == '') {
return $path;
}
+
+ if (rtrim($path,'/') === rtrim($this->fakeRoot, '/')) {
+ return '/';
+ }
+
if (strpos($path, $this->fakeRoot) !== 0) {
return null;
} else {