only cleanUp the remaining keys if the migration really finished succesfully

This commit is contained in:
Bjoern Schiessle 2015-07-08 18:23:18 +02:00
parent 0fe81d2f21
commit 85c3b9d5cf
3 changed files with 5 additions and 1 deletions

View File

@ -115,5 +115,7 @@ class MigrateKeys extends Command {
}
}
$migration->finalCleanUp();
}
}

View File

@ -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');

View File

@ -102,6 +102,8 @@ class EncryptionController extends Controller {
} while (count($users) >= $limit);
}
$migration->finalCleanUp();
} catch (\Exception $e) {
return array(
'data' => array(