diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-14 10:20:00 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-08-14 10:22:13 -0400 |
commit | 4c7fd8cd0191871e48704f693f48554d4ee7a726 (patch) | |
tree | a66a930783de938deaa3d2362dcf779e5c2b45af /lib/filesystemview.php | |
parent | 64ef1e21819979d7fdc406d2628bc175b16fe554 (diff) | |
parent | 62e4f55f721971dacd06649cecefe0487626aa75 (diff) | |
download | nextcloud-server-4c7fd8cd0191871e48704f693f48554d4ee7a726.tar.gz nextcloud-server-4c7fd8cd0191871e48704f693f48554d4ee7a726.zip |
Merge branch 'master' into share_api
Conflicts:
lib/group.php
lib/group/backend.php
lib/group/database.php
lib/group/interface.php
lib/public/user.php
lib/user.php
lib/user/backend.php
lib/user/database.php
lib/user/interface.php
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 a488b4953d5..df1ece0bafc 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; + } } } |