1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-27 08:36:03 +02:00

Warn of any unicode replacement characters

Unicode replacement characters mean --check is not able to check the file so warn when generating them.  This time with NAME.

Fixes issue #281
This commit is contained in:
joveian 2023-01-12 14:46:43 -08:00 committed by GitHub
parent e366618d22
commit ebff7467cb
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -340,6 +340,9 @@ fn filepath_to_string(filepath: &Path) -> FilepathString {
filepath_string = filepath_string.replace('\\', "\\\\").replace('\n', "\\n");
is_escaped = true;
}
if filepath_string.contains('<27>') {
eprintln!("{}: {}: must be valid unicode and not contain '<27>' for --check", NAME, filepath_string);
}
FilepathString {
filepath_string,
is_escaped,