Skip to content

Commit

Permalink
Fix Some Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdWindScholar committed Oct 1, 2023
1 parent f1f4c90 commit 193fe81
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,15 @@ def unpack(file, info, project):
open(project + os.sep + 'config' + os.sep + os.path.basename(file).split('.')[0] + "_erofs", 'w').close()
elif info == 'super':
lpunpack.unpack(os.path.abspath(file), project)
for v in os.listdir(project):
if os.path.isfile(project+os.sep+v):
if os.path.getsize(project+os.sep+v) == 0:
os.remove(project+os.sep+v)
else:
if v.endswith('_a.img'):
shutil.move(project+os.sep+v,project+os.sep+v.replace('_a',''))
elif v.endswith('_b.img'):
shutil.move(project + os.sep + v, project + os.sep + v.replace('_b', ''))
elif info in ['boot', 'vendor_boot']:
unpackboot(os.path.abspath(file), project)
else:
Expand Down

0 comments on commit 193fe81

Please sign in to comment.