From 85c3b9d5cf9fe9c9d884c7a08b0da46e4e585720 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 8 Jul 2015 18:23:18 +0200 Subject: only cleanUp the remaining keys if the migration really finished succesfully --- apps/encryption/command/migratekeys.php | 2 ++ apps/encryption/lib/migration.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/encryption') 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'); -- cgit v1.2.3