Fix icon for undetectable files

This commit is contained in:
bakatrouble 2017-04-29 06:32:48 +03:00
parent be2a274c39
commit b211dae67b

View File

@ -35,7 +35,9 @@ def get_sort_link(current, sort, hidden):
def get_file_icon(name): def get_file_icon(name):
t = guess_type(name)[0].split('/')[0] mime = guess_type(name)[0]
if mime:
t = mime.split('/')[0]
if t in ['text', 'image', 'audio', 'video']: if t in ['text', 'image', 'audio', 'video']:
return t return t
return '' return ''