aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/db/sqlite_adapter.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/db/sqlite_adapter.rs b/src/db/sqlite_adapter.rs
index f3aa35d1..ce6412b6 100644
--- a/src/db/sqlite_adapter.rs
+++ b/src/db/sqlite_adapter.rs
@@ -144,9 +144,12 @@ impl IDb for SqliteDb {
let percent = (p.pagecount - p.remaining) * 100 / p.pagecount;
info!("Sqlite snapshot progress: {}%", percent);
}
+ std::fs::create_dir_all(to)?;
+ let mut path = to.clone();
+ path.push("db.sqlite");
self.db
.get()?
- .backup(rusqlite::DatabaseName::Main, to, Some(progress))?;
+ .backup(rusqlite::DatabaseName::Main, path, Some(progress))?;
Ok(())
}