Also remove leading / from paths to file which are marked as deleted
This commit is contained in:
parent
1fa2527a7b
commit
30db2c07d3
|
|
@ -112,7 +112,8 @@ func (t *Tar) Whiteout(p string) error {
|
||||||
name := ".wh." + filepath.Base(p)
|
name := ".wh." + filepath.Base(p)
|
||||||
|
|
||||||
th := &tar.Header{
|
th := &tar.Header{
|
||||||
Name: filepath.Join(dir, name),
|
// Docker uses no leading / in the tarball
|
||||||
|
Name: strings.TrimLeft(filepath.Join(dir, name), "/"),
|
||||||
Size: 0,
|
Size: 0,
|
||||||
}
|
}
|
||||||
if err := t.w.WriteHeader(th); err != nil {
|
if err := t.w.WriteHeader(th); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue