Use canonical config path
This commit is contained in:
parent
46adcd9345
commit
53f1a3dcc6
1 changed files with 2 additions and 2 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);
|
||||
let path = std::path::Path::new(CONFIG_PATH).canonicalize()?;
|
||||
|
||||
let config = Config::read(path).await?;
|
||||
let config = Config::read(&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