diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filesystem.php | 5 | ||||
-rw-r--r-- | lib/util.php | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/filesystem.php b/lib/filesystem.php index a688c9c2b06..829482c7fa5 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -175,7 +175,7 @@ class OC_Filesystem{ * @param string path * @return OC_Filestorage */ - static private function getStorage($path){ + static public function getStorage($path){ $mountpoint=self::getMountPoint($path); if($mountpoint){ return self::$storages[$mountpoint]; @@ -189,7 +189,7 @@ class OC_Filesystem{ * @param string path * @return string */ - static private function getMountPoint($path){ + static public function getMountPoint($path){ if(!$path){ $path='/'; } @@ -214,6 +214,7 @@ class OC_Filesystem{ } return $foundMountPoint; } + /** * return the path to a local version of the file * we need this because we can't know if a file is stored local or not from outside the filestorage and for some purposes a local file is needed diff --git a/lib/util.php b/lib/util.php index 8b8a27657b2..10cd320977a 100644 --- a/lib/util.php +++ b/lib/util.php @@ -53,6 +53,10 @@ class OC_Util { // } OC_Filesystem::mount($rootStorage,'/'); + // TODO add this storage provider in a proper way + $sharedStorage = OC_Filesystem::createStorage('shared',array('datadir'=>'/'.OC_User::getUser().'/files/Share/')); + OC_Filesystem::mount($sharedStorage,'/'.OC_User::getUser().'/files/Share/'); + $CONFIG_DATADIRECTORY = "$CONFIG_DATADIRECTORY_ROOT/$user/$root"; if( !is_dir( $CONFIG_DATADIRECTORY )){ mkdir( $CONFIG_DATADIRECTORY, 0755, true ); |