mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-10 09:12:05 +00:00
fix: skip permission errors when replacing adb
This commit is contained in:
@@ -142,10 +142,13 @@ class EmulatorManager(AlasManager):
|
|||||||
for adb in replace:
|
for adb in replace:
|
||||||
logger.info(f'Replacing {adb}')
|
logger.info(f'Replacing {adb}')
|
||||||
bak = self.adb_path_to_backup(adb, new_backup=True)
|
bak = self.adb_path_to_backup(adb, new_backup=True)
|
||||||
logger.info(f'{adb} -----> {bak}')
|
try:
|
||||||
shutil.move(adb, bak)
|
logger.info(f'{adb} -----> {bak}')
|
||||||
logger.info(f'{self.adb} -----> {adb}')
|
shutil.move(adb, bak)
|
||||||
shutil.copy(self.adb, adb)
|
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):
|
def adb_recover(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user