fix: put back set_last_opened
This commit is contained in:
parent
43d382c988
commit
2fd3b41e03
1 changed files with 6 additions and 2 deletions
|
|
@ -213,11 +213,15 @@ impl State {
|
||||||
let (db_path, password) = (self.db_path.clone(), self.password.clone());
|
let (db_path, password) = (self.db_path.clone(), self.password.clone());
|
||||||
Task::perform(
|
Task::perform(
|
||||||
async move {
|
async move {
|
||||||
Ok(keepass::Database::open(
|
let db = keepass::Database::open(
|
||||||
&mut fs::File::open(&db_path).map_err(|e| e.to_string())?,
|
&mut fs::File::open(&db_path).map_err(|e| e.to_string())?,
|
||||||
keepass::DatabaseKey::new().with_password(&password),
|
keepass::DatabaseKey::new().with_password(&password),
|
||||||
)
|
)
|
||||||
.map_err(|e| e.to_string())?)
|
.map_err(|e| e.to_string())?;
|
||||||
|
|
||||||
|
db::set_last_opened(&db_path).map_err(|e| e.to_string())?;
|
||||||
|
|
||||||
|
Ok(db)
|
||||||
},
|
},
|
||||||
Message::DbOpened,
|
Message::DbOpened,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue