1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-11-16 05:18:38 +00:00

tar: more clear if predicate

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-08-10 13:46:14 -04:00
parent 48e7ab8031
commit 2a99b062a7

6
tar.go
View file

@ -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)
}
}
}