diff --git a/ee/app/services/vulnerability_exports/export_service.rb b/ee/app/services/vulnerability_exports/export_service.rb index 8293f254f5deddb531655ffed1046317eca63ba5..ef00e522878c653f85c0e5324225e6303778b293 100644 --- a/ee/app/services/vulnerability_exports/export_service.rb +++ b/ee/app/services/vulnerability_exports/export_service.rb @@ -66,13 +66,9 @@ def finalise_segmented_export vulnerability_export.export_parts.each do |part| part.file.open do |stream| - first_skip = export_header.present? - stream.each_line do |line| - if first_skip - first_skip = false - next - end + stream.readline if export_header.present? # Moves the cursor to next line + stream.each_line do |line| # The encoding of the parts is read as ASCI-8BIT. # We need to force the encoding to utf-8 to avoid a write failure due to # wide-chars used in place like group names.