find data dir properly

This commit is contained in:
2023-04-28 22:34:17 -07:00
parent c5dcc2e50a
commit b761d3b493
5 changed files with 90 additions and 36 deletions

View File

@ -38,7 +38,7 @@ async fn setup(app: &mut App) -> Result<(), Box<dyn Error>> {
APP.set(app.handle()).unwrap();
let conn_opts = SqliteConnectOptions::new()
.filename(config::get_or_create_db_path())
.filename(config::get_or_create_db_path()?)
.create_if_missing(true);
let pool_opts = SqlitePoolOptions::new();
let pool: SqlitePool = pool_opts.connect_with(conn_opts).await?;