diff --git a/server/src/web/mod.rs b/server/src/web/mod.rs index 5e1ccd2..532a15d 100644 --- a/server/src/web/mod.rs +++ b/server/src/web/mod.rs @@ -196,7 +196,7 @@ impl Service { match FsDir::builder().for_path(&d) { Err(e) => { warn!( - "Unable to load --ui-dir={}; will serve no static files: {}", + "Unable to load ui dir {}; will serve no static files: {}", d.display(), e ); diff --git a/server/src/web/static_file.rs b/server/src/web/static_file.rs index 25347ff..7ddeaea 100644 --- a/server/src/web/static_file.rs +++ b/server/src/web/static_file.rs @@ -11,10 +11,9 @@ use super::{internal_server_err, not_found, ResponseResult, Service}; impl Service { /// Serves a static file if possible. pub(super) async fn static_file(&self, req: Request) -> ResponseResult { - let dir = self - .ui_dir - .clone() - .ok_or_else(|| not_found("--ui-dir not configured; no static files available."))?; + let dir = self.ui_dir.clone().ok_or_else(|| { + not_found("ui dir not configured or missing; no static files available.") + })?; let static_req = match StaticFileRequest::parse(req.uri().path()) { None => return Err(not_found("static file not found")), Some(r) => r,