mirror of
https://github.com/Huluti/Curtail.git
synced 2024-09-19 18:27:40 +03:00
Fix directory handling
filename parameter can have PosixPath type and therefore should be explicitly converted to string
This commit is contained in:
parent
c0f26b1fda
commit
9816201f26
@ -62,7 +62,7 @@ def add_filechooser_filters(dialog):
|
||||
|
||||
|
||||
def get_file_type(filename):
|
||||
content_type, uncertain = Gio.content_type_guess(filename=filename)
|
||||
content_type, uncertain = Gio.content_type_guess(filename=str(filename))
|
||||
if not uncertain:
|
||||
if content_type == 'image/jpeg':
|
||||
return 'jpg'
|
||||
|
Loading…
Reference in New Issue
Block a user