Don't auto-decompress archives with smart_open [ci skip]

This commit is contained in:
Ines Montani 2020-09-21 16:01:46 +02:00
parent e548654aca
commit e8bcaa44f1

View File

@ -306,7 +306,7 @@ def download_file(src: Union[str, "Pathy"], dest: Path, *, force: bool = False)
if dest.exists() and not force:
return None
src = str(src)
with smart_open.open(src, mode="rb") as input_file:
with smart_open.open(src, mode="rb", ignore_ext=True) as input_file:
with dest.open(mode="wb") as output_file:
output_file.write(input_file.read())