// if one of the move operation was succesful we remove the files back to have a consistent state
if($keyfilesRestored){
$view->rename('keyfiles','keyfiles.backup');
}
if($sharekeysRestored){
$view->rename('share-keys','share-keys.backup');
}
\OCP\JSON::error(array('data'=>array('message'=>$l->t('Couldn\'t restore your encryption keys, please check your owncloud.log or ask your administrator'))));