Merge pull request #25021 from dmcgowan/fix-24951

Fix calculation of relative path for symlink on docker save
Upstream-commit: 3c038318e535ac8e629499a145e686c833a34e75
Component: engine
This commit is contained in:
Tibor Vass
2016-07-25 22:24:45 -07:00
committed by GitHub

View File

@ -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
}