diff --git a/src/args.rs b/src/args.rs index 5bd4e51..471d0db 100644 --- a/src/args.rs +++ b/src/args.rs @@ -69,8 +69,10 @@ impl Args trace!("paths: Ignoring empty line. Yielding then continuing."); tokio::task::yield_now().await; continue; - } else { + } else if path_bytes[n-1] == b'\n' { &path_bytes[.. (path_bytes.len()-1)] + } else { + path_bytes }; let path = Path::new(OsStr::from_bytes(path_bytes)); trace!("Read path {:?}", path); @@ -276,6 +278,10 @@ where I: Iterator .with_section(move || limit.header("Invalid parameter was"))?; match limit { 0 => None, + 1 => { + warn!("`--recursive 1` is a no-op, did you mean `--recursive 2`?"); + Some(1) + }, n => Some(n), } } else {