Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions pkg/archive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading