From 495d1258fd50780ea1dffd05eeef558161dc041d Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 6 Mar 2018 13:23:49 -0500 Subject: [PATCH] Consistent sniffing regardless of in_place. Previously sniffing would happen on the original file (before carriage returns and tabular spaces were converted) if in_place was false and on the converted file if it was true. --- tools/data_source/upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/data_source/upload.py b/tools/data_source/upload.py index bdb9ad4139a..4e0cdcdb042 100644 --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -277,7 +277,7 @@ def add_file(dataset, registry, json_file, output_path): else: line_count, converted_path = sniff.convert_newlines(dataset.path, in_place=in_place, tmp_dir=tmpdir, tmp_prefix=tmp_prefix) if dataset.file_type == 'auto': - ext = sniff.guess_ext(dataset.path, registry.sniff_order) + ext = sniff.guess_ext(converted_path or dataset.path, registry.sniff_order) else: ext = dataset.file_type data_type = ext