From 16aaac0965b1851312c27142fc2cefac56190f4f Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Thu, 14 Oct 2021 18:51:12 -0500 Subject: [PATCH] :bug: bug: used the wrong PathBuf function in resolving the merge --- crates/ptth_file_server_bin/src/lib.rs | 2 +- crates/ptth_server/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 (),