aboutsummaryrefslogtreecommitdiffstats
path: root/lib/filesystemview.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-15 17:39:00 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-15 17:39:00 +0200
commit63af75586b53391670c2ccfb48d19f4b6950cab0 (patch)
treefa5a16539431673c9f51e54bb313ed69a30c60b6 /lib/filesystemview.php
parent4954e46bb2ba36c749b638111dc90500e12cedf7 (diff)
parentdd3208fe6fadff3ad831df2fa5220e2184738b21 (diff)
downloadnextcloud-server-63af75586b53391670c2ccfb48d19f4b6950cab0.tar.gz
nextcloud-server-63af75586b53391670c2ccfb48d19f4b6950cab0.zip
Merge branch 'master' into routing
Diffstat (limited to 'lib/filesystemview.php')
-rw-r--r--lib/filesystemview.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/filesystemview.php b/lib/filesystemview.php
index faf3f0bd4cc..9d85befdc8c 100644
--- a/lib/filesystemview.php
+++ b/lib/filesystemview.php
@@ -54,10 +54,9 @@ class OC_FilesystemView {
if($path[0]!=='/'){
$path='/'.$path;
}
- return $this->fakeRoot.$path;
+ return OC_Filesystem::normalizePath($this->fakeRoot.$path);
}
-
-
+
/**
* change the root to a fake toor
* @param string fakeRoot
@@ -104,7 +103,12 @@ class OC_FilesystemView {
if(strpos($path, $this->fakeRoot)!==0) {
return null;
}else{
- return substr($path, strlen($this->fakeRoot));
+ $path=substr($path, strlen($this->fakeRoot));
+ if(strlen($path)===0){
+ return '/';
+ }else{
+ return $path;
+ }
}
}