mirror of
https://github.com/getzola/zola
synced 2024-12-04 17:39:20 +00:00
fix: zola panic if no static dir (#2608)
This commit is contained in:
parent
abc851049d
commit
286b88e268
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,7 @@ use ws::{Message, Sender, WebSocket};
|
|||
use errors::{anyhow, Context, Error, Result};
|
||||
use site::sass::compile_sass;
|
||||
use site::{Site, SITE_CONTENT};
|
||||
use utils::fs::{clean_site_output_folder, copy_file};
|
||||
use utils::fs::{clean_site_output_folder, copy_file, create_directory};
|
||||
|
||||
use crate::fs_utils::{filter_events, ChangeKind, SimpleFileSystemEventKind};
|
||||
use crate::messages;
|
||||
|
@ -502,6 +502,7 @@ pub fn serve(
|
|||
let ws_port = site.live_reload;
|
||||
let ws_address = format!("{}:{}", interface, ws_port.unwrap());
|
||||
let output_path = site.output_path.clone();
|
||||
create_directory(&output_path)?;
|
||||
|
||||
// static_root needs to be canonicalized because we do the same for the http server.
|
||||
let static_root = std::fs::canonicalize(&output_path).unwrap();
|
||||
|
|
Loading…
Reference in a new issue