Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -25,6 +25,13 @@ func UnpackLayer(dest string, layer Reader, options *TarOptions) (size int64, er |
| 25 | 25 |
defer pools.BufioReader32KPool.Put(trBuf) |
| 26 | 26 |
|
| 27 | 27 |
var dirs []*tar.Header |
| 28 |
+ |
|
| 29 |
+ if options == nil {
|
|
| 30 |
+ options = &TarOptions{}
|
|
| 31 |
+ } |
|
| 32 |
+ if options.ExcludePatterns == nil {
|
|
| 33 |
+ options.ExcludePatterns = []string{}
|
|
| 34 |
+ } |
|
| 28 | 35 |
remappedRootUID, remappedRootGID, err := idtools.GetRootUIDGID(options.UIDMaps, options.GIDMaps) |
| 29 | 36 |
if err != nil {
|
| 30 | 37 |
return 0, err |