Add normal word doc to file_catalog

pull/21/head
Dan Puttick 2017-07-25 11:51:23 -04:00
parent 00ac5da5f7
commit 60bd5362c1
3 changed files with 7 additions and 4 deletions

View File

@ -238,7 +238,6 @@ class File(FileBase):
"""
if self.maintype in Config.ignored_mimes:
self.should_copy = False
self.mime_processing_options.get(self.maintype, self.unknown)()
else:
self._check_dangerous()
self._check_filename()
@ -246,8 +245,9 @@ class File(FileBase):
self._check_extension()
if self.has_mimetype:
self._check_mimetype()
if not self.is_dangerous:
self.mime_processing_options.get(self.maintype, self.unknown)()
if not self.is_dangerous:
self.mime_processing_options.get(self.maintype, self.unknown)()
def write_log(self):
"""Pass information about the file to self.logger"""
@ -255,7 +255,7 @@ class File(FileBase):
props = self.get_all_props()
if not self.is_archive:
if os.path.exists(self.tempdir_path):
# FIXME: in_tempdir is a hack to make images appear at the correct tree depth in log
# FIXME: in_tempdir is a hack to make image files appear at the correct tree depth in log
self.logger.add_file(self.src_path, props, in_tempdir=True)
return
self.logger.add_file(self.src_path, props)

View File

@ -27,6 +27,9 @@ normal:
mimetype: text/rtf
sample_mpeg4.mp4: # Added 28-06-2017, source: https://support.apple.com/en-us/HT201549
mimetype: video/mp4
word_docx.docx: # Added 24-07-2017, source: hand-generated using MacOS Microsoft Word 2011
description: normal word document
# mimetype:
zip_archive.zip: # Added 27-06-2017, source: hand-generated
mimetype: application/zip

BIN
tests/normal/word_docx.docx Normal file

Binary file not shown.