From 37fc204b18d3bca323a402d4bbf901736202fa76 Mon Sep 17 00:00:00 2001 From: Dan Puttick Date: Thu, 27 Jul 2017 11:30:26 -0400 Subject: [PATCH] Fix regression with application mimetypes --- bin/filecheck.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/filecheck.py b/bin/filecheck.py index cb7f1d2..7066f39 100644 --- a/bin/filecheck.py +++ b/bin/filecheck.py @@ -246,11 +246,11 @@ class File(FileBase): def application(self): """Process an application specific file according to its subtype.""" - if self.subtype in self.app_subtype_methods: - method = self.app_subtype_methods[self.subtype] - method() - else: - self._unknown_app() + for subtype, method in self.app_subtype_methods.items(): + if subtype in self.subtype: # checking for partial matches + method() + return + self._unknown_app() # if none of the methods match def _executables(self): """Process an executable file."""