1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-29 15:07:14 +08:00

Fix: [ALAS] Skip permission errors when replacing adb

This commit is contained in:
LmeSzinc
2026-03-28 18:17:42 +08:00
parent e45fd05341
commit 0c4f46180e
2 changed files with 19 additions and 13 deletions

View File

@@ -142,10 +142,13 @@ class EmulatorManager(AlasManager):
for adb in replace:
logger.info(f'Replacing {adb}')
bak = self.adb_path_to_backup(adb, new_backup=True)
logger.info(f'{adb} -----> {bak}')
shutil.move(adb, bak)
logger.info(f'{self.adb} -----> {adb}')
shutil.copy(self.adb, adb)
try:
logger.info(f'{adb} -----> {bak}')
shutil.move(adb, bak)
logger.info(f'{self.adb} -----> {adb}')
shutil.copy(self.adb, adb)
except OSError as e:
logger.warning(f'Failed to replace {adb}, {e}')
def adb_recover(self):
"""