From 7018664e5b3ef400719be2b5819bca88d82ddc06 Mon Sep 17 00:00:00 2001 From: Scott Stevenson Date: Sat, 29 Jan 2022 22:32:39 +0000 Subject: [PATCH] Include path separator in log message This adds a path separator between the directory and filenames in the message printed by `zola serve` to indicate it is listening for changes. Before: Listening for changes in /path/to/dir{config.toml, content, sass, static, templates} After: Listening for changes in /path/to/dir/{config.toml, content, sass, static, templates} ^ --- src/cmd/serve.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cmd/serve.rs b/src/cmd/serve.rs index 78180710a7..b84655e1f9 100644 --- a/src/cmd/serve.rs +++ b/src/cmd/serve.rs @@ -23,7 +23,7 @@ use std::fs::{read_dir, remove_dir_all}; use std::net::{SocketAddrV4, TcpListener}; -use std::path::{Path, PathBuf}; +use std::path::{Path, PathBuf, MAIN_SEPARATOR}; use std::sync::mpsc::channel; use std::thread; use std::time::{Duration, Instant}; @@ -419,7 +419,12 @@ pub fn serve( broadcaster }; - println!("Listening for changes in {}{{{}}}", root_dir.display(), watchers.join(", ")); + println!( + "Listening for changes in {}{}{{{}}}", + root_dir.display(), + MAIN_SEPARATOR, + watchers.join(", ") + ); println!("Press Ctrl+C to stop\n"); // Delete the output folder on ctrl+C