diff --git a/src/cmd/watch.rs b/src/cmd/watch.rs index 9e8fe89a..9d9960f7 100644 --- a/src/cmd/watch.rs +++ b/src/cmd/watch.rs @@ -87,6 +87,8 @@ fn find_gitignore(book_root: &Path) -> Option { .find(|p| p.exists()) } +// Using `canonicalize` can fail on Windows sometimes, might be a potential risk. +// see ([https://github.com/rust-lang/mdBook/pull/2229#discussion_r1408665981). fn filter_ignored_files(ignore: Gitignore, paths: &[PathBuf]) -> Vec { let ignore_root = ignore .path()