Project

General

Profile

Defect #22583 ยป fix_csv_autodetection.patch

Jan from Planio www.plan.io, 2016-04-19 16:38

View differences:

app/models/import.rb
separator = lu(user, :general_csv_separator)
if file_exists?
begin
content = File.read(filepath, 256, "rb")
content = File.read(filepath, 256)
separator = [',', ';'].sort_by {|sep| content.count(sep) }.last
rescue Exception => e
end
    (1-1/1)