[F] Fix path join

This commit is contained in:
Azalea Gui
2023-02-17 10:40:28 -05:00
parent 5d89ffcfb9
commit 3f67edbc1f
+2 -2
View File
@@ -5,7 +5,7 @@ use std::convert::Infallible;
use std::{env, fs};
use std::net::SocketAddr;
use std::os::unix::fs::MetadataExt;
use hyper::{Body, http, Request, Response, Server, StatusCode};
use hyper::{Body, http, Request, Response, Server};
use hyper::service::{make_service_fn, service_fn};
use serde::{Deserialize, Serialize};
use path_clean::{clean};
@@ -40,7 +40,7 @@ struct ReturnPath {
}
async fn hello_world(_req: Request<Body>) -> http::Result<Response<Body>> {
let path = clean(_req.uri().path());
let path = format!(".{}", clean(_req.uri().path()));
println!("{path}");
// List files in directory