private $oldKey;
public function setUp(){
+ $user=OC_User::getUser();
+
$this->oldConfig=OCP\Config::getAppValue('files_encryption','enable_encryption','true');
OCP\Config::setAppValue('files_encryption','enable_encryption','true');
$this->oldKey=isset($_SESSION['enckey'])?$_SESSION['enckey']:null;
OC_Filesystem::clearMounts();
OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/');
+ OC_Filesystem::init('/'.$user.'/files');
+
//set up the users home folder in the temp storage
$rootView=new OC_FilesystemView('');
- $rootView->mkdir('/'.OC_User::getUser());
- $rootView->mkdir('/'.OC_User::getUser().'/files');
+ $rootView->mkdir('/'.$user);
+ $rootView->mkdir('/'.$user.'/files');
}
public function tearDown(){