From a175ffa19dd83ea7f0a5cff941aa65087ccf393e Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Wed, 12 Apr 2023 11:08:58 +0100 Subject: [PATCH] Fix #55. --- file_unix.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/file_unix.go b/file_unix.go index e907732..71fdb60 100644 --- a/file_unix.go +++ b/file_unix.go @@ -43,11 +43,13 @@ func initFilters(filters FileFilters) []string { buf.WriteString("--file-filter=") if f.Name != "" { buf.WriteString(f.Name) - buf.WriteRune('|') + buf.WriteByte('|') } - for _, p := range f.Patterns { + for i, p := range f.Patterns { + if i != 0 { + buf.WriteByte(' ') + } buf.WriteString(p) - buf.WriteRune(' ') } res = append(res, buf.String()) }