From e80abd0553dc80f7f713543bc5420de46a4967a0 Mon Sep 17 00:00:00 2001 From: int 80h Date: Wed, 20 May 2020 12:22:24 -0400 Subject: [PATCH] Fixed bug where usrdir could be false but still pass --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a342b06..613ea14 100644 --- a/src/main.rs +++ b/src/main.rs @@ -179,7 +179,7 @@ async fn handle_connection( let mut path = PathBuf::new(); - if url.path().starts_with("/~") && srv.server.usrdir.is_some() { + if url.path().starts_with("/~") && srv.server.usrdir.unwrap_or(false) { let usr = url.path().trim_start_matches("/~"); let usr: Vec<&str> = usr.splitn(2, "/").collect(); path.push("/home/");