du: fix --threshold err msg

This commit is contained in:
Maciej Habasiński 2023-03-25 16:44:14 +01:00 committed by GitHub
parent c014cb0655
commit 02f00e2c6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))