diff --git a/ChangeLog b/ChangeLog index 8c1055aca..12c85c670 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2008-01-16 Martin Hawlisch * src/plugins/DateParserDisplayTest.py: Use Tool.ToolOptions instead of None as options_class to make it no longer crash + * src/Mime/_PythonMime.py: Avoid crash on Windows if the mime type for + a folder is to be determined 2008-01-16 Benny Malengier * src/Editors/_EditMediaRef.py: diff --git a/src/Mime/_PythonMime.py b/src/Mime/_PythonMime.py index ee81f4662..68cdb999f 100644 --- a/src/Mime/_PythonMime.py +++ b/src/Mime/_PythonMime.py @@ -55,7 +55,7 @@ def get_description(mime_type): def get_type(filename): """Returns the mime type of the specified file""" value = mimetypes.guess_type(filename) - if value: + if value and value[0]: return value[0] else: return _('unknown')