Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-10-04 03:07:55 +0400
committerRobin Appelman <icewind1991@gmail.com>2010-10-04 03:07:55 +0400
commit494d88a4353799ae2fbc2631578664715c063c7e (patch)
treee79312221c255766eb850dc74c62303cc1bdb8df /inc
parent44946e208d22b0175fd14a3b1ac2a388bc3e58ba (diff)
fix bug in detecting mountpoints of file storages within chrooted filesystem
Diffstat (limited to 'inc')
-rw-r--r--inc/lib_filesystem.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/inc/lib_filesystem.php b/inc/lib_filesystem.php
index c8cbd1cb80d..60201825e06 100644
--- a/inc/lib_filesystem.php
+++ b/inc/lib_filesystem.php
@@ -169,9 +169,15 @@ class OC_FILESYSTEM{
if(substr($path,0,1)!=='/'){
$path='/'.$path;
}
+ if(substr($path,-1)!=='/'){
+ $path=$path.'/';
+ }
$path=self::$fakeRoot.$path;
$foundMountPoint='';
foreach(self::$storages as $mountpoint=>$storage){
+ if(substr($mountpoint,-1)!=='/'){
+ $mountpoint=$mountpoint.'/';
+ }
if($mountpoint==$path){
return $mountpoint;
}