mirror of
https://github.com/getzola/zola
synced 2024-11-10 14:24:27 +00:00
Little exactness tweaks (#1874)
* Correct Windows paths \\ is only for the beginning of UNC paths, e.g. \\host-name\share-name\file-path as per https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file * Remove spaces path list using brace expansion In the shell, spaces are significant in a path with brace expansion, and break it. (As opposed to in Rust module brace expansion.)
This commit is contained in:
parent
294505f4bc
commit
da799ea508
1 changed files with 4 additions and 4 deletions
|
@ -419,7 +419,7 @@ pub fn serve(
|
|||
broadcaster
|
||||
};
|
||||
|
||||
println!("Listening for changes in {}{{{}}}", root_dir.display(), watchers.join(", "));
|
||||
println!("Listening for changes in {}{{{}}}", root_dir.display(), watchers.join(","));
|
||||
|
||||
println!("Press Ctrl+C to stop\n");
|
||||
// Delete the output folder on ctrl+C
|
||||
|
@ -764,9 +764,9 @@ mod tests {
|
|||
#[cfg(windows)]
|
||||
fn windows_path_handling() {
|
||||
let expected = (ChangeKind::Templates, PathBuf::from("/templates/hello.html"));
|
||||
let pwd = Path::new(r#"C:\\Users\johan\site"#);
|
||||
let path = Path::new(r#"C:\\Users\johan\site\templates\hello.html"#);
|
||||
let config_filename = Path::new(r#"C:\\Users\johan\site\config.toml"#);
|
||||
let pwd = Path::new(r#"C:\Users\johan\site"#);
|
||||
let path = Path::new(r#"C:\Users\johan\site\templates\hello.html"#);
|
||||
let config_filename = Path::new(r#"C:\Users\johan\site\config.toml"#);
|
||||
assert_eq!(expected, detect_change_kind(pwd, path, config_filename));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue