Skip to content

Commit

Permalink
fix: pass ee root when call create_dir_all (#1062)
Browse files Browse the repository at this point in the history
* fix: pass ee root when call create_dir_all

* resolve comment
  • Loading branch information
darknight authored Dec 16, 2023
1 parent 68f5ab7 commit 3adb652
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ee/tabby-webserver/src/service/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ impl DbConn {
}

pub async fn new() -> Result<Self> {
let db_path = db_file();
tokio::fs::create_dir_all(db_path.as_path()).await?;
let conn = Connection::open(db_path).await?;
tokio::fs::create_dir_all(db_file().parent().unwrap()).await?;
let conn = Connection::open(db_file()).await?;
Self::init_db(conn).await
}

Expand Down

0 comments on commit 3adb652

Please sign in to comment.