summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-24 15:14:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-04-24 15:14:06 +0000
commit6376762917788a9a9daad35236fac46065a98cab (patch)
tree3c1066f561dc965929ed2ecfcd294e46b644fcc5 /app/models
parent7e366ace036448e16b66cd63772cb27ff3b17bea (diff)
downloadredmine-6376762917788a9a9daad35236fac46065a98cab.tar.gz
redmine-6376762917788a9a9daad35236fac46065a98cab.zip
CSV import delimiter detection broken (#22583).
Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@15357 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/import.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/import.rb b/app/models/import.rb
index 127f7be88..22b90b6ac 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -51,7 +51,7 @@ class Import < ActiveRecord::Base
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