Also remove leading / from paths to file which are marked as deleted

This commit is contained in:
xanonid 2019-08-09 17:30:45 +02:00
parent 1fa2527a7b
commit 30db2c07d3
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ func (t *Tar) Whiteout(p string) error {
name := ".wh." + filepath.Base(p)
th := &tar.Header{
Name: filepath.Join(dir, name),
// Docker uses no leading / in the tarball
Name: strings.TrimLeft(filepath.Join(dir, name), "/"),
Size: 0,
}
if err := t.w.WriteHeader(th); err != nil {