From 5c5525eb3d792cac0eea649d5b723b0f99f92dde Mon Sep 17 00:00:00 2001 From: ColdWindScholar <3590361911@qq.com> Date: Sat, 24 Feb 2024 16:53:07 +0800 Subject: [PATCH] [Normal] Support android --- imgextractor.py | 2 +- run.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/imgextractor.py b/imgextractor.py index 3073c75..5f48682 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: + if self.__out_name(os.path.basename(output_dir)) != mount and mount: 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 34508a8..0ad15d4 100644 --- a/run.py +++ b/run.py @@ -1705,7 +1705,8 @@ def unpack(file, info, project): mount = ext4.Volume(e).get_mount_point if mount[:1] == '/': mount = mount[1:] - parts[mount] = 'ext' + if mount: + 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) try: