Skip to content

Commit

Permalink
Consistent sniffing regardless of in_place.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jmchilton committed Mar 8, 2018
1 parent ca28000 commit 495d125
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/data_source/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 495d125

Please sign in to comment.