From a1b5b69248a7e112bc970e50cbf1e757c2530b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herbert=20M=C3=BChlburger?= Date: Sat, 28 Apr 2018 09:16:46 +0200 Subject: [PATCH] Refactor to be more precise --- pkg/chartutil/save.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/chartutil/save.go b/pkg/chartutil/save.go index dd835a924..201372a0f 100644 --- a/pkg/chartutil/save.go +++ b/pkg/chartutil/save.go @@ -24,7 +24,6 @@ import ( "io/ioutil" "os" "path/filepath" - "strings" "github.com/ghodss/yaml" @@ -205,9 +204,8 @@ func writeTarContents(out *tar.Writer, c *chart.Chart, prefix string) error { // writeToTar writes a single file to a tar archive. func writeToTar(out *tar.Writer, name string, body []byte) error { // TODO: Do we need to create dummy parent directory names if none exist? - name = strings.Replace(name, "\\", "/", -1) h := &tar.Header{ - Name: name, + Name: filepath.ToSlash(name), Mode: 0755, Size: int64(len(body)), }