* src/Mime/_PythonMime.py: Avoid crash on Windows if the mime type for a folder is to be determined
svn: r9844
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user