mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #17 from alexlarsson/dm-plugin-whiteout-directory
archive.ApplyLayer() - handle directory whiteouts
This commit is contained in:
commit
50d80a8938
1 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,11 @@ func ApplyLayer(dest string, layer Archive) error {
|
||||||
// Step 2: walk for whiteouts and apply them, removing them in the process
|
// Step 2: walk for whiteouts and apply them, removing them in the process
|
||||||
err := filepath.Walk(dest, func(fullPath string, f os.FileInfo, err error) error {
|
err := filepath.Walk(dest, func(fullPath string, f os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
// This happens in the case of whiteouts in parent dir removing a directory
|
||||||
|
// We just ignore it
|
||||||
|
return filepath.SkipDir
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue