From d80fb6d33a43c485b81f81c8d0369b586be7dea3 Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Tue, 22 Aug 2017 16:41:06 -0400 Subject: [PATCH] Add alias for .ogg files --- filecheck/config.py | 4 +++- filecheck/filecheck.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/filecheck/config.py b/filecheck/config.py index 21f3631..23e9466 100644 --- a/filecheck/config.py +++ b/filecheck/config.py @@ -31,7 +31,9 @@ class Config: 'application/x-dosexec': 'application/x-msdos-program', # Other apps with confusing mimetypes 'application/rtf': 'text/rtf', - 'application/rar': 'application/x-rar' + 'application/rar': 'application/x-rar', + 'application/ogg': 'audio/ogg', + 'audio/ogg': 'application/ogg' } # EXTS diff --git a/filecheck/filecheck.py b/filecheck/filecheck.py index 080fc3b..5d91b05 100644 --- a/filecheck/filecheck.py +++ b/filecheck/filecheck.py @@ -112,7 +112,7 @@ class File(FileBase): strict=False) if expected_extensions: if self.has_extension and self.extension not in expected_extensions: - self.make_dangerous('Extension does not match expected extensions for this mimetype') + self.make_dangerous('Extension does not match expected extensions ({}) for this mimetype'.format(expected_extensions)) def _check_filename(self): """