diff options
Diffstat (limited to 'lib/filesystemview.php')
-rw-r--r-- | lib/filesystemview.php | 12 |
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; + } } } |