mirror of
https://github.com/containers/podman.git
synced 2025-12-10 07:42:12 +08:00
Bump github.com/containers/storage from 1.31.1 to 1.31.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.31.1 to 1.31.2. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.31.1...v1.31.2) Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
11
vendor/github.com/containers/storage/pkg/archive/archive_linux.go
generated
vendored
11
vendor/github.com/containers/storage/pkg/archive/archive_linux.go
generated
vendored
@@ -129,6 +129,17 @@ func (overlayWhiteoutConverter) ConvertReadWithHandler(hdr *tar.Header, path str
|
||||
originalPath := filepath.Join(dir, originalBase)
|
||||
|
||||
if err := handler.Mknod(originalPath, unix.S_IFCHR, 0); err != nil {
|
||||
// If someone does:
|
||||
// rm -rf /foo/bar
|
||||
// in an image, some tools will generate a layer with:
|
||||
// /.wh.foo
|
||||
// /foo/.wh.bar
|
||||
// and when doing the second mknod(), we will fail with
|
||||
// ENOTDIR, since the previous /foo was mknod()'d as a
|
||||
// character device node and not a directory.
|
||||
if isENOTDIR(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
if err := handler.Chown(originalPath, hdr.Uid, hdr.Gid); err != nil {
|
||||
|
||||
3
vendor/github.com/containers/storage/pkg/archive/changes.go
generated
vendored
3
vendor/github.com/containers/storage/pkg/archive/changes.go
generated
vendored
@@ -121,6 +121,9 @@ func isENOTDIR(err error) bool {
|
||||
if err == nil {
|
||||
return false
|
||||
}
|
||||
if err == syscall.ENOTDIR {
|
||||
return true
|
||||
}
|
||||
if perror, ok := err.(*os.PathError); ok {
|
||||
if errno, ok := perror.Err.(syscall.Errno); ok {
|
||||
return errno == syscall.ENOTDIR
|
||||
|
||||
Reference in New Issue
Block a user