Skip to content

Commit

Permalink
rely on exported native extension first
Browse files Browse the repository at this point in the history
  • Loading branch information
JuicyDragon committed Mar 1, 2024
1 parent 781a281 commit 74fcbce
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Ruby/CustomExporter.nuixscript/CustomExporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,14 @@ def coalesce(input,fallback="NO_VALUE")
extension = natives_email_format
end
else
extension = current_item.getCorrectedExtension
extension ||= current_item.getOriginalExtension
extension ||= current_item.getType.getPreferredExtension
extension ||= "BIN"
ext_choices = [
(File.extname(record["ITEMPATH"]) || "").delete('.'),
current_item.getCorrectedExtension,
current_item.getOriginalExtension,
current_item.getType.getPreferredExtension,
"BIN"
]
extension = ext_choices.select{|ext| !ext.nil? && !ext.strip.empty?}.first
end
resolver.set("extension",extension)

Expand Down

0 comments on commit 74fcbce

Please sign in to comment.