fix bug in detecting mountpoints of file storages within chrooted filesystem

This commit is contained in:
Robin Appelman 2010-10-03 23:07:55 +00:00
parent 44946e208d
commit 494d88a435
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}