aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-07-08 18:23:18 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-07-08 18:23:18 +0200
commit85c3b9d5cf9fe9c9d884c7a08b0da46e4e585720 (patch)
tree959e12d18ab1ca769a5f3290eb246e8871258a88
parent0fe81d2f214c59dbe223e949232475fb8a6f24b9 (diff)
downloadnextcloud-server-85c3b9d5cf9fe9c9d884c7a08b0da46e4e585720.tar.gz
nextcloud-server-85c3b9d5cf9fe9c9d884c7a08b0da46e4e585720.zip
only cleanUp the remaining keys if the migration really finished succesfully
-rw-r--r--apps/encryption/command/migratekeys.php2
-rw-r--r--apps/encryption/lib/migration.php2
-rw-r--r--settings/controller/encryptioncontroller.php2
3 files changed, 5 insertions, 1 deletions
diff --git a/apps/encryption/command/migratekeys.php b/apps/encryption/command/migratekeys.php
index e6e5e7b70b0..d0fc1573061 100644
--- a/apps/encryption/command/migratekeys.php
+++ b/apps/encryption/command/migratekeys.php
@@ -115,5 +115,7 @@ class MigrateKeys extends Command {
}
}
+ $migration->finalCleanUp();
+
}
}
diff --git a/apps/encryption/lib/migration.php b/apps/encryption/lib/migration.php
index 98fc5be777a..391267603cd 100644
--- a/apps/encryption/lib/migration.php
+++ b/apps/encryption/lib/migration.php
@@ -50,7 +50,7 @@ class Migration {
$this->config = $config;
}
- public function __destruct() {
+ public function finalCleanUp() {
$this->view->deleteAll('files_encryption/public_keys');
$this->updateFileCache();
$this->config->deleteAppValue('files_encryption', 'installed_version');
diff --git a/settings/controller/encryptioncontroller.php b/settings/controller/encryptioncontroller.php
index 411b9e87cc1..87cbf0a4bf1 100644
--- a/settings/controller/encryptioncontroller.php
+++ b/settings/controller/encryptioncontroller.php
@@ -102,6 +102,8 @@ class EncryptionController extends Controller {
} while (count($users) >= $limit);
}
+ $migration->finalCleanUp();
+
} catch (\Exception $e) {
return array(
'data' => array(