only cleanUp the remaining keys if the migration really finished succesfully
This commit is contained in:
parent
0fe81d2f21
commit
85c3b9d5cf
|
@ -115,5 +115,7 @@ class MigrateKeys extends Command {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$migration->finalCleanUp();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Migration {
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct() {
|
public function finalCleanUp() {
|
||||||
$this->view->deleteAll('files_encryption/public_keys');
|
$this->view->deleteAll('files_encryption/public_keys');
|
||||||
$this->updateFileCache();
|
$this->updateFileCache();
|
||||||
$this->config->deleteAppValue('files_encryption', 'installed_version');
|
$this->config->deleteAppValue('files_encryption', 'installed_version');
|
||||||
|
|
|
@ -102,6 +102,8 @@ class EncryptionController extends Controller {
|
||||||
} while (count($users) >= $limit);
|
} while (count($users) >= $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$migration->finalCleanUp();
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return array(
|
return array(
|
||||||
'data' => array(
|
'data' => array(
|
||||||
|
|
Loading…
Reference in New Issue