use new filesystem to mount users home
This commit is contained in:
parent
ff09a1f37b
commit
87b98dab25
1 changed files with 13 additions and 3 deletions
|
@ -57,9 +57,19 @@ class Storage {
|
||||||
*/
|
*/
|
||||||
public function store($filename) {
|
public function store($filename) {
|
||||||
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
|
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
|
||||||
list($uid, $filename) = self::getUidAndFilename($filename);
|
$owner = \OC\Files\Filesystem::getOwner($filename);
|
||||||
$files_view = new \OC\Files\View('/'.\OCP\User::getUser() .'/files');
|
if ( $owner != \OCP\User::getUser() ) {
|
||||||
$users_view = new \OC\Files\View('/'.\OCP\User::getUser());
|
$datadir = \OC_Config::getValue( "datadirectory", \OC::$SERVERROOT."/data" );
|
||||||
|
\OC\Files\Filesystem::mount( '\OC\Files\Storage\Local', array('datadir'=>$datadir), '/'.$owner );
|
||||||
|
$info = \OC\Files\Filesystem::getFileInfo($filename);
|
||||||
|
$id = $info['fileid'];
|
||||||
|
error_log("id: $id");
|
||||||
|
$path = \OC\Files\Filesystem::getPath($id);
|
||||||
|
error_log("new path: $path");
|
||||||
|
}
|
||||||
|
|
||||||
|
$files_view = new \OC\Files\View('/'.$uid .'/files');
|
||||||
|
$users_view = new \OC\Files\View('/'.$uid);
|
||||||
|
|
||||||
//check if source file already exist as version to avoid recursions.
|
//check if source file already exist as version to avoid recursions.
|
||||||
// todo does this check work?
|
// todo does this check work?
|
||||||
|
|
Loading…
Reference in a new issue