From 0a79ed754183e09f76a0ae975c18f74046b30b9d Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Thu, 12 May 2022 17:45:54 -0300 Subject: [PATCH] Add AST FAT-image-with-header format --- biostools/extractors.py | 68 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/biostools/extractors.py b/biostools/extractors.py index 3c637cc..dbdfc31 100644 --- a/biostools/extractors.py +++ b/biostools/extractors.py @@ -1147,17 +1147,75 @@ class FATExtractor(ArchiveExtractor): if len(file_header) < 512: return False - # Stop if there's no bootstrap jump. - if (file_header[0] != 0xEB or file_header[2] != 0x90) and file_header[0] != 0xE9: - return False + # Stop if this doesn't appear to be a FAT filesystem. + if not self._is_fat(file_header): + # Check for 4-byte AST filesystem followed by FAT filesystem. + ast_size, unknown = struct.unpack('