summaryrefslogtreecommitdiffstats
path: root/core/command/encryption
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-09-18 15:05:18 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-09-18 15:05:18 +0200
commit5472a5f455cfd6ff9ce956fa51be206789e608db (patch)
treeda78786853461f90dc393877068bf7c19dfd344c /core/command/encryption
parent2f102c1f0d2fc93d1d9091297b0cb920fc8947de (diff)
downloadnextcloud-server-5472a5f455cfd6ff9ce956fa51be206789e608db.tar.gz
nextcloud-server-5472a5f455cfd6ff9ce956fa51be206789e608db.zip
Also catch exceptions on encryptAll and reset trashbin and singleUser mode
Diffstat (limited to 'core/command/encryption')
-rw-r--r--core/command/encryption/encryptall.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/command/encryption/encryptall.php b/core/command/encryption/encryptall.php
index 2269663b21f..4ae6ae47836 100644
--- a/core/command/encryption/encryptall.php
+++ b/core/command/encryption/encryptall.php
@@ -115,8 +115,13 @@ class EncryptAll extends Command {
if ($this->questionHelper->ask($input, $output, $question)) {
$this->forceSingleUserAndTrashbin();
- $defaultModule = $this->encryptionManager->getEncryptionModule();
- $defaultModule->encryptAll($input, $output);
+ try {
+ $defaultModule = $this->encryptionManager->getEncryptionModule();
+ $defaultModule->encryptAll($input, $output);
+ } catch (\Exception $ex) {
+ $this->resetSingleUserAndTrashbin();
+ throw $ex;
+ }
$this->resetSingleUserAndTrashbin();
} else {