Windows: Fix AV in build due to userns

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6d71f277608b2a655df0942d00607f47dbcaa37b
Component: engine
This commit is contained in:
John Howard
2015-10-13 14:01:36 -07:00
parent b3621750e0
commit 486257052d

View File

@ -25,6 +25,13 @@ func UnpackLayer(dest string, layer Reader, options *TarOptions) (size int64, er
defer pools.BufioReader32KPool.Put(trBuf)
var dirs []*tar.Header
if options == nil {
options = &TarOptions{}
}
if options.ExcludePatterns == nil {
options.ExcludePatterns = []string{}
}
remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(options.UIDMaps, options.GIDMaps)
if err != nil {
return 0, err