Unpack should set 0755 when the parent directory doesn't exist.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2019-02-13 18:27:08 -08:00
parent 543ee8e7f4
commit 14f7e52725

View File

@ -194,7 +194,7 @@ func applyNaive(ctx context.Context, root string, tr *tar.Reader, options ApplyO
parentPath = filepath.Dir(path) parentPath = filepath.Dir(path)
} }
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) { if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
err = mkdirAll(parentPath, 0700) err = mkdirAll(parentPath, 0755)
if err != nil { if err != nil {
return 0, err return 0, err
} }