diff --git a/crates/ptth_file_server_bin/src/lib.rs b/crates/ptth_file_server_bin/src/lib.rs index d6079ce..bbc4002 100644 --- a/crates/ptth_file_server_bin/src/lib.rs +++ b/crates/ptth_file_server_bin/src/lib.rs @@ -111,7 +111,7 @@ pub async fn main (_args: &[OsString]) -> anyhow::Result <()> { }); let state = Arc::new (FileServer::new ( - file_server_root.unwrap_or_else (PathBuf::new), + file_server_root.unwrap_or_else (|| PathBuf::from (".")), &PathBuf::new (), name, metrics_interval, diff --git a/crates/ptth_server/src/lib.rs b/crates/ptth_server/src/lib.rs index c7986ae..bf3ab02 100644 --- a/crates/ptth_server/src/lib.rs +++ b/crates/ptth_server/src/lib.rs @@ -321,7 +321,7 @@ pub async fn run_server ( let file_server = file_server::FileServer::new ( config_file.file_server_root.clone (), - &asset_root.clone ().unwrap_or_else (PathBuf::new), + &asset_root.clone ().unwrap_or_else (|| PathBuf::from (".")), config_file.name.clone (), metrics_interval, hidden_path.clone (),