mirror of https://github.com/CIRCL/PyCIRCLean
Add normal word doc to file_catalog
parent
00ac5da5f7
commit
60bd5362c1
|
@ -238,7 +238,6 @@ class File(FileBase):
|
||||||
"""
|
"""
|
||||||
if self.maintype in Config.ignored_mimes:
|
if self.maintype in Config.ignored_mimes:
|
||||||
self.should_copy = False
|
self.should_copy = False
|
||||||
self.mime_processing_options.get(self.maintype, self.unknown)()
|
|
||||||
else:
|
else:
|
||||||
self._check_dangerous()
|
self._check_dangerous()
|
||||||
self._check_filename()
|
self._check_filename()
|
||||||
|
@ -246,8 +245,9 @@ class File(FileBase):
|
||||||
self._check_extension()
|
self._check_extension()
|
||||||
if self.has_mimetype:
|
if self.has_mimetype:
|
||||||
self._check_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):
|
def write_log(self):
|
||||||
"""Pass information about the file to self.logger"""
|
"""Pass information about the file to self.logger"""
|
||||||
|
@ -255,7 +255,7 @@ class File(FileBase):
|
||||||
props = self.get_all_props()
|
props = self.get_all_props()
|
||||||
if not self.is_archive:
|
if not self.is_archive:
|
||||||
if os.path.exists(self.tempdir_path):
|
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)
|
self.logger.add_file(self.src_path, props, in_tempdir=True)
|
||||||
return
|
return
|
||||||
self.logger.add_file(self.src_path, props)
|
self.logger.add_file(self.src_path, props)
|
||||||
|
|
|
@ -27,6 +27,9 @@ normal:
|
||||||
mimetype: text/rtf
|
mimetype: text/rtf
|
||||||
sample_mpeg4.mp4: # Added 28-06-2017, source: https://support.apple.com/en-us/HT201549
|
sample_mpeg4.mp4: # Added 28-06-2017, source: https://support.apple.com/en-us/HT201549
|
||||||
mimetype: video/mp4
|
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
|
zip_archive.zip: # Added 27-06-2017, source: hand-generated
|
||||||
mimetype: application/zip
|
mimetype: application/zip
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue