mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
du: fix --threshold err msg
This commit is contained in:
parent
c014cb0655
commit
02f00e2c6b
1 changed files with 3 additions and 0 deletions
|
@ -913,6 +913,9 @@ impl FromStr for Threshold {
|
|||
let size = parse_size(&s[offset..])?;
|
||||
|
||||
if s.starts_with('-') {
|
||||
if size == 0 {
|
||||
return Err(ParseSizeError::ParseFailure(s.to_string()));
|
||||
}
|
||||
Ok(Self::Upper(size))
|
||||
} else {
|
||||
Ok(Self::Lower(size))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue