summaryrefslogtreecommitdiffstats
path: root/apps/encryption
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 /apps/encryption
parent0fe81d2f214c59dbe223e949232475fb8a6f24b9 (diff)
downloadnextcloud-server-85c3b9d5cf9fe9c9d884c7a08b0da46e4e585720.tar.gz
nextcloud-server-85c3b9d5cf9fe9c9d884c7a08b0da46e4e585720.zip
only cleanUp the remaining keys if the migration really finished succesfully
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/command/migratekeys.php2
-rw-r--r--apps/encryption/lib/migration.php2
2 files changed, 3 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');