summaryrefslogtreecommitdiffstats
path: root/lib/filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-03-03 18:02:07 +0100
committerRobin Appelman <icewind@owncloud.com>2012-03-03 21:23:35 +0100
commit2e365658c856e1dffd1ee748db40158fdda0edc3 (patch)
tree7b43b4a6057796fbc65a0dce9af13e062fb9497d /lib/filesystem.php
parent4c45483ad3acd5b675e54893686f912a32f10a12 (diff)
downloadnextcloud-server-2e365658c856e1dffd1ee748db40158fdda0edc3.tar.gz
nextcloud-server-2e365658c856e1dffd1ee748db40158fdda0edc3.zip
better handeling of files that can behave like folder (e.g. archives)
Diffstat (limited to 'lib/filesystem.php')
-rw-r--r--lib/filesystem.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 5013b3968c5..12905d189f9 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -146,20 +146,15 @@ class OC_Filesystem{
* @return string
*/
static public function getMountPoint($path){
+ OC_Hook::emit(self::CLASSNAME,'get_mountpoint',array('path'=>$path));
if(!$path){
$path='/';
}
if(substr($path,0,1)!=='/'){
$path='/'.$path;
}
- if(substr($path,-1)!=='/'){
- $path=$path.'/';
- }
$foundMountPoint='';
foreach(OC_Filesystem::$mounts as $mountpoint=>$storage){
- if(substr($mountpoint,-1)!=='/'){
- $mountpoint=$mountpoint.'/';
- }
if($mountpoint==$path){
return $mountpoint;
}
@@ -259,6 +254,9 @@ class OC_Filesystem{
* @param string mountpoint
*/
static public function mount($class,$arguments,$mountpoint){
+ if(substr($mountpoint,-1)!=='/'){
+ $mountpoint=$mountpoint.'/';
+ }
if(substr($mountpoint,0,1)!=='/'){
$mountpoint='/'.$mountpoint;
}