1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 08:38:20 +08:00

Fix: deploy.emulator replace twice

This commit is contained in:
LmeSzinc
2020-09-12 01:37:21 +08:00
parent 0debf1a533
commit c0327cffc8

View File

@@ -86,11 +86,10 @@ class VirtualBoxEmulator:
adb (str): Absolute path to adb.exe
"""
for ori, bak in zip(self.adb_binary, self.adb_backup):
if os.path.exists(bak):
os.remove(bak)
shutil.move(ori, bak)
for file in self.adb_binary:
shutil.copy(adb, file)
if not os.path.exists(bak):
print(f'Replacing {ori}')
shutil.move(ori, bak)
shutil.copy(adb, ori)
def adb_recover(self):
""" Revert adb replacement """