We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8288be3 commit adc63faCopy full SHA for adc63fa
1 file changed
src/uu/wc/src/wc.rs
@@ -61,7 +61,8 @@ fn try_get_stdin_size() -> Option<usize> {
61
62
let file_type = rustix::fs::FileType::from_raw_mode(stat.st_mode);
63
64
- if file_type == rustix::fs::FileType::RegularFile && stat.st_size > 0 {
+ if file_type == rustix::fs::FileType::RegularFile && stat.st_size > 0 && stat.st_nlink == 1
65
+ {
66
return Some(stat.st_size as usize);
67
}
68
0 commit comments