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
51 51
    separator = lu(user, :general_csv_separator)
52 52
    if file_exists?
53 53
      begin
54
        content = File.read(filepath, 256, "rb")
54
        content = File.read(filepath, 256)
55 55
        separator = [',', ';'].sort_by {|sep| content.count(sep) }.last
56 56
      rescue Exception => e
57 57
      end
    (1-1/1)