fix(auth): fix env being closed when dumping

This commit is contained in:
ad hoc 2022-02-09 13:55:36 +01:00
parent cca65499de
commit 23eba82038
No known key found for this signature in database
GPG key ID: 4F00A782990CC643
2 changed files with 11 additions and 2 deletions

View file

@ -10,7 +10,10 @@ const KEYS_PATH: &str = "keys";
impl AuthController {
pub fn dump(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> Result<()> {
let store = HeedAuthStore::new(&src)?;
let mut store = HeedAuthStore::new(&src)?;
// do not attempt to close the database on drop!
store.set_drop_on_close(false);
let keys_file_path = dst.as_ref().join(KEYS_PATH);