mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 19:47:45 +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..])?;
|
let size = parse_size(&s[offset..])?;
|
||||||
|
|
||||||
if s.starts_with('-') {
|
if s.starts_with('-') {
|
||||||
|
if size == 0 {
|
||||||
|
return Err(ParseSizeError::ParseFailure(s.to_string()));
|
||||||
|
}
|
||||||
Ok(Self::Upper(size))
|
Ok(Self::Upper(size))
|
||||||
} else {
|
} else {
|
||||||
Ok(Self::Lower(size))
|
Ok(Self::Lower(size))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue