1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

Update hashsum quoting FIXME instructions

This commit is contained in:
Jan Verbeek 2021-09-07 19:48:28 +02:00
parent 6d346b2307
commit 918603909b

View file

@ -547,10 +547,15 @@ where
) )
) )
.to_ascii_lowercase(); .to_ascii_lowercase();
// FIXME: (How) should these be quoted? // FIXME: Filenames with newlines should be treated specially.
// They seem like they would be processed programmatically, and // GNU appears to replace newlines by \n and backslashes by
// our ordinary quoting might interfere, but newlines should be // \\ and prepend a backslash (to the hash or filename) if it did
// sanitized probably // this escaping.
// Different sorts of output (checking vs outputting hashes) may
// handle this differently. Compare carefully to GNU.
// If you can, try to preserve invalid unicode using OsStr(ing)Ext
// and display it using uucore::display::print_verbatim(). This is
// easier (and more important) on Unix than on Windows.
if sum == real_sum { if sum == real_sum {
if !options.quiet { if !options.quiet {
println!("{}: OK", ck_filename); println!("{}: OK", ck_filename);