add comment

This commit is contained in:
leonzchang 2023-11-29 11:50:07 +08:00
parent 40c034ed3f
commit 7082689866
No known key found for this signature in database
GPG Key ID: DBC5671A30EB9CA3
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ fn find_gitignore(book_root: &Path) -> Option<PathBuf> {
.find(|p| p.exists()) .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<PathBuf> { fn filter_ignored_files(ignore: Gitignore, paths: &[PathBuf]) -> Vec<PathBuf> {
let ignore_root = ignore let ignore_root = ignore
.path() .path()