shred: use exact if size is given

This commit is contained in:
John Shin 2023-05-30 15:08:22 -07:00
parent f10059db02
commit 4b09b917cd

View file

@ -239,7 +239,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
.get_one::<String>(options::SIZE)
.map(|s| s.to_string());
let size = get_size(size_arg);
let exact = matches.get_flag(options::EXACT) && size.is_none(); // if -s is given, ignore -x
let exact = matches.get_flag(options::EXACT) || size.is_some();
let zero = matches.get_flag(options::ZERO);
let verbose = matches.get_flag(options::VERBOSE);