Browse Source

older versions of the library return this instead..

main
John-Mark Gurney 1 year ago
parent
commit
573c975066
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      ui/medashare/magic.py

+ 2
- 1
ui/medashare/magic.py View File

@@ -405,7 +405,8 @@ def detect_from_filename(filename):
t = x.mimecomp_magic.file(filename)

# if there's a decomp error, don't look at decomp
if t.startswith('application/x-decompression-error'):
if t.startswith('application/x-decompression-error') or \
t.startswith('gzip ERROR: Unknown compression format'):
return _create_filemagic(x.mime_magic.file(filename),
x.none_magic.file(filename))



Loading…
Cancel
Save