summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-02-04 12:07:16 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2015-02-04 12:47:04 +0100
commit21c45925fe11cac27cf61958a0c0863313afbdb2 (patch)
tree848c32c01e6ffc246348e2572ff645c5bc7c201a /lib/private
parent9e222ec841946d773514f790fcc567c634d27038 (diff)
downloadnextcloud-server-21c45925fe11cac27cf61958a0c0863313afbdb2.tar.gz
nextcloud-server-21c45925fe11cac27cf61958a0c0863313afbdb2.zip
detect root of mountpoint also if the trailing slash is missed
Diffstat (limited to 'lib/private')
-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 {