From 440fb867bc35cbef4880bd5111d84fd026db4d52 Mon Sep 17 00:00:00 2001 From: Mariano Casco Date: Mon, 30 May 2016 16:43:14 -0300 Subject: [PATCH] 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. --- src/tail/tail.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tail/tail.rs b/src/tail/tail.rs index 70e8ab5ea..ab526ec97 100755 --- a/src/tail/tail.rs +++ b/src/tail/tail.rs @@ -303,7 +303,7 @@ const BLOCK_SIZE: u64 = 1 << 16; fn follow(mut readers: Vec>, filenames: &Vec, 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));