Also catch exceptions on encryptAll and reset trashbin and singleUser mode
This commit is contained in:
parent
2f102c1f0d
commit
5472a5f455
|
@ -115,8 +115,13 @@ class EncryptAll extends Command {
|
||||||
if ($this->questionHelper->ask($input, $output, $question)) {
|
if ($this->questionHelper->ask($input, $output, $question)) {
|
||||||
$this->forceSingleUserAndTrashbin();
|
$this->forceSingleUserAndTrashbin();
|
||||||
|
|
||||||
|
try {
|
||||||
$defaultModule = $this->encryptionManager->getEncryptionModule();
|
$defaultModule = $this->encryptionManager->getEncryptionModule();
|
||||||
$defaultModule->encryptAll($input, $output);
|
$defaultModule->encryptAll($input, $output);
|
||||||
|
} catch (\Exception $ex) {
|
||||||
|
$this->resetSingleUserAndTrashbin();
|
||||||
|
throw $ex;
|
||||||
|
}
|
||||||
|
|
||||||
$this->resetSingleUserAndTrashbin();
|
$this->resetSingleUserAndTrashbin();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue