1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

tail: no headers when following a single file

Headers should only be printed when following more than one file. This
commit makes the test_follow() test pass again.
This commit is contained in:
Mariano Casco 2016-05-30 16:43:14 -03:00
parent 8866e05e98
commit 440fb867bc

View file

@ -303,7 +303,7 @@ const BLOCK_SIZE: u64 = 1 << 16;
fn follow<T: Read>(mut readers: Vec<BufReader<T>>, filenames: &Vec<String>, settings: &Settings) {
assert!(settings.follow);
let mut last = readers.len();
let mut last = readers.len() - 1;
loop {
sleep(Duration::new(0, settings.sleep_msec*1000));