Fix double-recording of recursively-added dirs Previously, if you added a directory, the directory header would be written once, and then written again during the file walk stage. Change-Id: I111e720e2c449411759fffff7808a0871d06b4ac
1 files changed, 1 insertions(+), 1 deletions(-) M mtar.go
M mtar.go => mtar.go +1 -1
@@ 444,7 444,7 @@ func addRecursive(w *tar.Writer, src, prefix string, opts *FileOpts) { src = strings.TrimRight(src, "/") src = filepath.Clean(src) + "/" filepath.Walk(src, func(p string, info os.FileInfo, err error) error { if info.IsDir() { if info.IsDir() && !strings.HasSuffix(p, "/") { p += "/" } if p == src || shouldSkip(skipSrcGlobs, p) {