mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 14:52:41 +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…
Reference in a new issue