Skip to content

Commit 46b2c8f

Browse files
committed
fix
1 parent 2445190 commit 46b2c8f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dlt/common/storages/fsspec_filesystem.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,12 @@ def read_bytes(self) -> bytes:
236236

237237

238238
def guess_mime_type(file_name: str) -> Sequence[str]:
239-
return mimetypes.guess_type(posixpath.basename(file_name), strict=False) or (
240-
"application/" + (posixpath.splitext(file_name)[1][1:] or "octet-stream"),
241-
None,
242-
)
239+
type_ = list(mimetypes.guess_type(posixpath.basename(file_name), strict=False))
240+
241+
if not type_[0]:
242+
type_[0] = "application/" + (posixpath.splitext(file_name)[1][1:] or "octet-stream")
243+
244+
return type_
243245

244246

245247
def glob_files(

0 commit comments

Comments
 (0)