mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-21 21:35:51 +00:00
Archive: Fix up tar commandline arguments in TarFilter()
There is no need to duplicate the compression flags for every element in the filter.
This commit is contained in:
committed by
Tianon Gravi
parent
1c5dc26a7c
commit
b86f67126c
+2
-1
@@ -90,8 +90,9 @@ func TarFilter(path string, compression Compression, filter []string) (io.Reader
|
||||
if filter == nil {
|
||||
filter = []string{"."}
|
||||
}
|
||||
args = append(args, "-c"+compression.Flag())
|
||||
for _, f := range filter {
|
||||
args = append(args, "-c"+compression.Flag(), f)
|
||||
args = append(args, f)
|
||||
}
|
||||
return CmdStream(exec.Command(args[0], args[1:]...))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user