diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-02-14 11:56:41 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-02-14 11:56:41 +0100 |
commit | 87b98dab25bec98c9018364a827427e2e9ac7782 (patch) | |
tree | 2c020979c2e07200e6b34568e67c7c8d3b2682a6 /apps | |
parent | ff09a1f37baa5ad5bd63c57ec5384e3ffbc38ad0 (diff) | |
download | nextcloud-server-87b98dab25bec98c9018364a827427e2e9ac7782.tar.gz nextcloud-server-87b98dab25bec98c9018364a827427e2e9ac7782.zip |
use new filesystem to mount users home
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_versions/lib/versions.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index b54bc4a4422..9f021bc4f88 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -57,9 +57,19 @@ class Storage { */ public function store($filename) { if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') { - list($uid, $filename) = self::getUidAndFilename($filename); - $files_view = new \OC\Files\View('/'.\OCP\User::getUser() .'/files'); - $users_view = new \OC\Files\View('/'.\OCP\User::getUser()); + $owner = \OC\Files\Filesystem::getOwner($filename); + if ( $owner != \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. // todo does this check work? |