print warning message if meet non utf-8 path (#5731)

This commit is contained in:
WindSoilder 2022-06-07 21:22:52 +08:00 committed by GitHub
parent 8318d59ef1
commit 8c74b1e437
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -422,7 +422,10 @@ impl Iterator for Paths {
// FIXME (#9639): How do we handle non-utf8 filenames?
// Ignore them for now; ideally we'd still match them
// against a *
None => continue,
None => {
println!("warning: get non-utf8 filename {path:?}, ignored.");
continue;
}
Some(x) => x,
}
},