Skip to content

Commit

Permalink
update to never use magic on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
botanicvelious committed Mar 15, 2017
1 parent e95b1a0 commit 9a80859
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/damn_at/mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def guess_type(url, strict=True):
If this fails fallback to libmagic.
"""
res = sys_mimetypes.guess_type(url, strict)
if res[0] is None or res[0] == 'application/octet-stream':
'''dont use magic if windows, ever'''
if (res[0] is None or res[0] == 'application/octet-stream') and os.name != 'nt':
paths = [None]*2
paths[0] = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'magic.blender')
paths[1] = '/usr/share/misc/magic.mgc'
Expand Down

0 comments on commit 9a80859

Please sign in to comment.