mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
Update src/uu/wc/src/count_fast.rs
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
This commit is contained in:
parent
967c539cc6
commit
0076c9f64c
1 changed files with 1 additions and 2 deletions
|
@ -173,12 +173,11 @@ pub(crate) fn count_bytes_fast<T: WordCountable>(handle: &mut T) -> (usize, Opti
|
|||
if let Some(file) = handle.inner_file() {
|
||||
if let Ok(metadata) = file.metadata() {
|
||||
let attributes = metadata.file_attributes();
|
||||
let size = metadata.file_size();
|
||||
|
||||
if (attributes & FILE_ATTRIBUTE_ARCHIVE) != 0
|
||||
|| (attributes & FILE_ATTRIBUTE_NORMAL) != 0
|
||||
{
|
||||
return (size as usize, None);
|
||||
return (metadata.file_size() as usize, None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue