Skip to content

Commit 5c5525e

Browse files
[Normal] Support android
1 parent ba50263 commit 5c5525e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

imgextractor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def main(self, target: str, output_dir: str, work: str, target_type: str = 'img'
265265
mount = ext4.Volume(file).get_mount_point
266266
if mount[:1] == '/':
267267
mount = mount[1:]
268-
if self.__out_name(os.path.basename(output_dir)) != mount:
268+
if self.__out_name(os.path.basename(output_dir)) != mount and mount:
269269
print(f"[N]:Your File Name Not Right , We will Extract {self.OUTPUT_IMAGE_FILE} to {mount}")
270270
self.EXTRACT_DIR = os.path.realpath(os.path.dirname(output_dir)) + os.sep + mount
271271
self.FileName = mount

run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,8 @@ def unpack(file, info, project):
17051705
mount = ext4.Volume(e).get_mount_point
17061706
if mount[:1] == '/':
17071707
mount = mount[1:]
1708-
parts[mount] = 'ext'
1708+
if mount:
1709+
parts[mount] = 'ext'
17091710
with Console().status(f"[yellow]正在提取{os.path.basename(file)}[/]"):
17101711
imgextractor.Extractor().main(file, project + os.sep + os.path.basename(file).split('.')[0], project)
17111712
try:

0 commit comments

Comments
 (0)