From 2a99b062a70a47a7c5d1966596fa85ad19cd7f70 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 10 Aug 2016 13:46:14 -0400 Subject: [PATCH] tar: more clear `if` predicate Signed-off-by: Vincent Batts --- tar.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tar.go b/tar.go index bcab9c8..6c4c74a 100644 --- a/tar.go +++ b/tar.go @@ -51,12 +51,12 @@ func (ts *tarStream) readHeaders() { notimekws := []string{} for _, kw := range ts.keywords { if !inSlice(kw, notimekws) { - if kw != "time" { - notimekws = append(notimekws, kw) - } else { + if kw == "time" { if !inSlice("tar_time", ts.keywords) { notimekws = append(notimekws, "tar_time") } + } else { + notimekws = append(notimekws, kw) } } }