Commit bb875b56 authored by Michelle Noorali's avatar Michelle Noorali Committed by GitHub

Merge pull request #896 from michelleN/fix/892-fetch-untar

fix(chartutil): fix chartutil.Expand function
parents ab4e20c2 bcffe8a3
......@@ -40,6 +40,16 @@ func Expand(dir string, r io.Reader) error {
return err
}
//split header name and create missing directories
d, _ := filepath.Split(header.Name)
fullDir := filepath.Join(dir, d)
_, err = os.Stat(fullDir)
if err != nil && d != "" {
if err := os.MkdirAll(fullDir, 0700); err != nil {
return err
}
}
path := filepath.Clean(filepath.Join(dir, header.Name))
info := header.FileInfo()
if info.IsDir() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment