Open weddige opened 1 year ago
__detect_mime_type has a bug in line 66/67:
__detect_mime_type
https://github.com/T0ha/ezodf/blob/f9675c165679290a15bd2f9ab75f90fbc1490668/ezodf/document.py#L56-L68
os.path.splitext returns the file extension with a leading dot (e. g. .ods). But MIMETYPES only contains the extensions without the dot:https://github.com/T0ha/ezodf/blob/f9675c165679290a15bd2f9ab75f90fbc1490668/ezodf/const.py#L23
os.path.splitext
.ods
MIMETYPES
emmm, This function is introduced by me...
ext = os.path.splitext(file_manager.zipname)[1] should be ext = os.path.splitext(file_manager.zipname)[1][1:]
ext = os.path.splitext(file_manager.zipname)[1]
ext = os.path.splitext(file_manager.zipname)[1][1:]
I will create a PR later.
__detect_mime_type
has a bug in line 66/67:https://github.com/T0ha/ezodf/blob/f9675c165679290a15bd2f9ab75f90fbc1490668/ezodf/document.py#L56-L68
os.path.splitext
returns the file extension with a leading dot (e. g..ods
). ButMIMETYPES
only contains the extensions without the dot:https://github.com/T0ha/ezodf/blob/f9675c165679290a15bd2f9ab75f90fbc1490668/ezodf/const.py#L23