Merge pull request #6 from alexlarsson/fix-ApplyLayer-remove

archive.ApplyLayer() remove files recursively
Upstream-commit: 78ef0bd9985d899dda6fdfc8c35d9ab47f7f07d7
Component: engine
This commit is contained in:
Solomon Hykes
2013-11-08 11:46:55 -08:00
+2 -2
View File
@@ -35,7 +35,7 @@ func ApplyLayer(dest string, layer Archive) error {
return err
} else if matched {
log.Printf("Removing aufs metadata %s", fullPath)
_ = os.Remove(fullPath)
_ = os.RemoveAll(fullPath)
}
filename := filepath.Base(path)
@@ -47,7 +47,7 @@ func ApplyLayer(dest string, layer Archive) error {
_ = os.Remove(rmTargetPath)
// Remove the whiteout itself
log.Printf("Removing whiteout %s", fullPath)
_ = os.Remove(fullPath)
_ = os.RemoveAll(fullPath)
}
return nil
})