diff --git a/go.mod b/go.mod index 5a8233a..8a0ac8c 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/containerd/platforms v0.2.1 github.com/containers/image/v5 v5.33.0 github.com/docker/docker v27.3.1+incompatible - github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d + github.com/mholt/archives v0.1.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 5e406d1..89d9b72 100644 --- a/go.sum +++ b/go.sum @@ -255,8 +255,8 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM= github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= -github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d h1:Vw3f39TqFSQLA+OyW+8SouppHTYzX8/fDv6Ao8uj3Ho= -github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d/go.mod h1:j/Ire/jm42GN7h90F5kzj6hf6ZFzEH66de+hmjEKu+I= +github.com/mholt/archives v0.1.0 h1:FacgJyrjiuyomTuNA92X5GyRBRZjE43Y/lrzKIlF35Q= +github.com/mholt/archives v0.1.0/go.mod h1:j/Ire/jm42GN7h90F5kzj6hf6ZFzEH66de+hmjEKu+I= github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs/v3 v3.0.1 h1:YaoXgBePoMA12+S1u/ddkv+QqxcfiZK4prI6HPnkFiU= diff --git a/vendor/github.com/mholt/archives/fs.go b/vendor/github.com/mholt/archives/fs.go index a189d5d..44b7e33 100644 --- a/vendor/github.com/mholt/archives/fs.go +++ b/vendor/github.com/mholt/archives/fs.go @@ -398,8 +398,12 @@ func (f ArchiveFS) Open(name string) (fs.File, error) { if err != nil { return nil, err } - if err := archiveFile.Close(); err != nil { - return nil, err + if archiveFile != nil { + // the archiveFile is closed at return only if there's an + // error; in this case, though, we can close it regardless + if err := archiveFile.Close(); err != nil { + return nil, err + } } return &dirFile{ info: dirFileInfo{archiveInfo}, diff --git a/vendor/modules.txt b/vendor/modules.txt index 7ac64bf..8afd47d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -433,7 +433,7 @@ github.com/mattn/go-runewidth # github.com/mattn/go-sqlite3 v1.14.24 ## explicit; go 1.19 github.com/mattn/go-sqlite3 -# github.com/mholt/archives v0.0.0-20241216060121-23e0af8fe73d +# github.com/mholt/archives v0.1.0 ## explicit; go 1.22.2 github.com/mholt/archives # github.com/miekg/pkcs11 v1.1.1