From 42cf962f0f082b54a16f14e5ffd9e8cf754a5574 Mon Sep 17 00:00:00 2001 From: ColdWindScholar <3590361911@qq.com> Date: Fri, 1 Mar 2024 21:24:14 +0800 Subject: [PATCH] [Normal] Fix Cannot Unpack mi_ext(fuck) --- imgextractor.py | 2 +- run.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/imgextractor.py b/imgextractor.py index 5f48682..8096c0f 100644 --- a/imgextractor.py +++ b/imgextractor.py @@ -265,7 +265,7 @@ def main(self, target: str, output_dir: str, work: str, target_type: str = 'img' mount = ext4.Volume(file).get_mount_point if mount[:1] == '/': mount = mount[1:] - if self.__out_name(os.path.basename(output_dir)) != mount and mount: + if self.__out_name(os.path.basename(output_dir)) != mount and mount and self.FileName != 'mi_ext': print(f"[N]:Your File Name Not Right , We will Extract {self.OUTPUT_IMAGE_FILE} to {mount}") self.EXTRACT_DIR = os.path.realpath(os.path.dirname(output_dir)) + os.sep + mount self.FileName = mount diff --git a/run.py b/run.py index 0ad15d4..f1aa7c6 100644 --- a/run.py +++ b/run.py @@ -1705,7 +1705,7 @@ def unpack(file, info, project): mount = ext4.Volume(e).get_mount_point if mount[:1] == '/': mount = mount[1:] - if mount: + if mount and os.path.basename(file).split('.')[0] != 'mi_ext': parts[mount] = 'ext' with Console().status(f"[yellow]正在提取{os.path.basename(file)}[/]"): imgextractor.Extractor().main(file, project + os.sep + os.path.basename(file).split('.')[0], project)