mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2024-12-25 22:55:55 -05:00
update missing ui-dir log lines
https://github.com/scottlamb/moonfire-nvr/issues/218#issuecomment-1098671419
This commit is contained in:
parent
9e6ac27cb0
commit
21da924d84
@ -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
|
||||
);
|
||||
|
@ -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<hyper::Body>) -> 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,
|
||||
|
Loading…
Reference in New Issue
Block a user