Fix canonicalize
This commit is contained in:
parent
fe131e7103
commit
464a5e1010
2 changed files with 11 additions and 5 deletions
|
|
@ -9,9 +9,9 @@ pub struct AppState {
|
|||
|
||||
impl AppState {
|
||||
pub async fn try_new() -> Result<Self> {
|
||||
let path = std::path::Path::new(CONFIG_PATH).canonicalize()?;
|
||||
let path = std::path::Path::new(CONFIG_PATH);
|
||||
|
||||
let config = Config::read(&path).await?;
|
||||
let config = Config::read_or_create(path).await?;
|
||||
let database = Database::try_new(&config.database).await?;
|
||||
|
||||
Ok(Self { config, database })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue