From 67cd4fd96828f51f316c4de8767776facc3bbd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Giba=C5=82a?= Date: Sat, 25 Aug 2018 13:48:05 +0200 Subject: [PATCH] Fix setting tar FileInfoHeader name --- tar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tar.go b/tar.go index b2ffba8e..ee0c4436 100644 --- a/tar.go +++ b/tar.go @@ -146,7 +146,7 @@ func tarFile(tarWriter *tar.Writer, source, dest string) error { } if baseDir != "" { - header.Name = filepath.Join(baseDir, strings.TrimPrefix(path, source)) + header.Name = filepath.ToSlash(filepath.Join(baseDir, strings.TrimPrefix(path, source))) } if header.Name == dest {