summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php5
-rw-r--r--lib/filesystem.php5
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 4636dd703ed..d81479e5a28 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -84,6 +84,7 @@ require_once('appconfig.php');
require_once('files.php');
require_once('filesystem.php');
require_once('filestorage.php');
+require_once('apps/files_sharing/sharedstorage.php');
require_once('l10n.php');
require_once('preferences.php');
require_once('log.php');
@@ -164,6 +165,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 );
diff --git a/lib/filesystem.php b/lib/filesystem.php
index b82fe2afebf..2c26667bbee 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