mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
FIX: handle charset=windows-1252 in mbox import script (#12832)
Co-authored-by: Loïc Dachary <loic@dachary.org>
This commit is contained in:
parent
1fd8f6df5f
commit
e7892df10d
|
@ -160,9 +160,7 @@ module ImportScripts::Mbox
|
|||
last_line_number = 0
|
||||
|
||||
each_line(filename) do |line|
|
||||
line = line.scrub
|
||||
|
||||
if line =~ @split_regex
|
||||
if line.scrub =~ @split_regex
|
||||
if last_line_number > 0
|
||||
yield raw_message, first_line_number, last_line_number
|
||||
raw_message = +''
|
||||
|
|
Loading…
Reference in New Issue
Block a user