Merge pull request #20782 from estesp/new-parent-dir-ownership

Fix ownership of non-existing parent dir
This commit is contained in:
Sebastiaan van Stijn 2016-03-01 01:45:38 +01:00
commit 3a366b1f39

View file

@ -664,7 +664,7 @@ loop:
parent := filepath.Dir(hdr.Name)
parentPath := filepath.Join(dest, parent)
if _, err := os.Lstat(parentPath); err != nil && os.IsNotExist(err) {
err = system.MkdirAll(parentPath, 0777)
err = idtools.MkdirAllNewAs(parentPath, 0777, remappedRootUID, remappedRootGID)
if err != nil {
return err
}