fix: put back set_last_opened

This commit is contained in:
electria 2026-08-25 20:45:04 -07:00
commit 2fd3b41e03
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -213,11 +213,15 @@ impl State {
let (db_path, password) = (self.db_path.clone(), self.password.clone());
Task::perform(
async move {
Ok(keepass::Database::open(
let db = keepass::Database::open(
&mut fs::File::open(&db_path).map_err(|e| e.to_string())?,
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,
)