From a3a95e66c3f7701b3586ae4bec07efa20c03aac8 Mon Sep 17 00:00:00 2001 From: Damjan Georgievski Date: Sat, 21 Jul 2018 20:13:14 +0200 Subject: [PATCH] also chdir to destination directory --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 54bd260..b4b1db3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -50,6 +50,9 @@ fn main() -> Result<(), io::Error> { std::env::set_var("RUST_LOG", "info"); env_logger::init(); + let root = std::path::Path::new(&chdir); + std::env::set_current_dir(&root).unwrap(); + let sys = actix::System::new("http_server_rs"); let directory = String::from(chdir);