diff --git a/archive/tar.go b/archive/tar.go index 0c44e123e..32edd3b3d 100644 --- a/archive/tar.go +++ b/archive/tar.go @@ -341,6 +341,7 @@ func createTarFile(ctx context.Context, path, extractDir string, hdr *tar.Header } } + //nolint:staticcheck // TypeRegA is deprecated but we may still receive an external tar with TypeRegA case tar.TypeReg, tar.TypeRegA: file, err := openFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, hdrInfo.Mode()) if err != nil { diff --git a/images/archive/importer.go b/images/archive/importer.go index a4f6651cd..3ca88091c 100644 --- a/images/archive/importer.go +++ b/images/archive/importer.go @@ -95,6 +95,7 @@ func ImportIndex(ctx context.Context, store content.Store, reader io.Reader, opt symlinks[hdr.Name] = path.Join(path.Dir(hdr.Name), hdr.Linkname) } + //nolint:staticcheck // TypeRegA is deprecated but we may still receive an external tar with TypeRegA if hdr.Typeflag != tar.TypeReg && hdr.Typeflag != tar.TypeRegA { if hdr.Typeflag != tar.TypeDir { log.G(ctx).WithField("file", hdr.Name).Debug("file type ignored")