diff --git a/ui/medashare/magic.py b/ui/medashare/magic.py index 04f0bde..27d3f3e 100644 --- a/ui/medashare/magic.py +++ b/ui/medashare/magic.py @@ -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))