Skip to content

Commit

Permalink
[release-1.51] overlay: ignore idtools.MkdirAllAs(diffDir) errors
Browse files Browse the repository at this point in the history
ignore errors creating and chowning the diffDiff if it is in an
additional image store.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe authored and TomSweeneyRedHat committed Jun 27, 2024
1 parent a89e91c commit f538ebb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,13 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
}

if err := idtools.MkdirAllAs(diffDir, perms, rootUID, rootGID); err != nil {
return "", err
if !inAdditionalStore {
return "", err
}
// if it is in an additional store, do not fail if the directory already exists
if _, err2 := os.Stat(diffDir); err2 != nil {
return "", err
}
}

mergedDir := path.Join(workDirBase, "merged")
Expand Down

0 comments on commit f538ebb

Please sign in to comment.