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.
This commit is contained in:
John Chilton
2018-03-08 10:33:42 -05:00
parent ca28000f8b
commit 495d1258fd
+1 -1
View File
@@ -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