diff --git a/image/tarexport/save.go b/image/tarexport/save.go index e1a4947d08..ddb87ee954 100644 --- a/image/tarexport/save.go +++ b/image/tarexport/save.go @@ -307,7 +307,7 @@ func (s *saveSession) saveLayer(id layer.ChainID, legacyImg image.V1Image, creat defer layer.ReleaseAndLog(s.ls, l) if oldPath, exists := s.diffIDPaths[l.DiffID()]; exists { - relPath, err := filepath.Rel(layerPath, oldPath) + relPath, err := filepath.Rel(outDir, oldPath) if err != nil { return distribution.Descriptor{}, err }