diff --git a/pkg/archive/archive.go b/pkg/archive/archive.go index 105acdea9..db4ba5147 100644 --- a/pkg/archive/archive.go +++ b/pkg/archive/archive.go @@ -60,11 +60,6 @@ func extractNestedArchive(ctx context.Context, d string, f string, extracted *sy return fmt.Errorf("failed to determine file type: %w", err) } - // Empty filetypes or invalid MIME types should not be evaluated via `extract` - if ft == nil || (ft != nil && ft.MIME == "") { - return nil - } - switch { case ft != nil && ft.MIME == "application/x-upx": isArchive = true @@ -153,11 +148,6 @@ func ExtractArchiveToTempDir(ctx context.Context, path string) (string, error) { return "", fmt.Errorf("failed to determine file type: %w", err) } - // Empty filetypes or invalid MIME types should not be evaluated via `extract` - if ft == nil || (ft != nil && ft.MIME == "") { - return "", fmt.Errorf("unsupported archive type: %s", path) - } - switch { case ft != nil && ft.MIME == "application/zlib": extract = ExtractZlib