mirror of
https://github.com/uutils/coreutils
synced 2024-11-15 17:28:03 +00:00
Fix difference w/ GNU coreutils' sum.
When using the SYSV algorithm and reading from standard input, the GNU coreutils implementation does not output the filename, in this case "-".
This commit is contained in:
parent
04014d314c
commit
26f0ec8379
1 changed files with 5 additions and 1 deletions
|
@ -112,7 +112,11 @@ Checksum and count the blocks in a file.", NAME, VERSION);
|
|||
matches.free
|
||||
};
|
||||
|
||||
let print_names = sysv || files.len() > 1;
|
||||
let print_names = if sysv {
|
||||
files.len() > 1 || files[0] != "-"
|
||||
} else {
|
||||
files.len() > 1
|
||||
};
|
||||
|
||||
for file in files.iter() {
|
||||
let reader = match open(file) {
|
||||
|
|
Loading…
Reference in a new issue