Fixed updating WinAIO Repair
This commit is contained in:
parent
56a74798e5
commit
0546ac3e84
1 changed files with 5 additions and 6 deletions
|
|
@ -138,7 +138,9 @@ def remove_from_kit(item):
|
|||
item_locations = []
|
||||
for p in [global_vars['BinDir'], global_vars['CBinDir']]:
|
||||
item_locations.append(r'{}\{}'.format(p, item))
|
||||
item_locations.append(r'{}\{}.7z'.format(p, item))
|
||||
item_locations.append(r'{}\_Drivers\{}'.format(p, item))
|
||||
item_locations.append(r'{}\_Drivers\{}.7z'.format(p, item))
|
||||
for item_path in item_locations:
|
||||
remove_item(item_path)
|
||||
|
||||
|
|
@ -996,21 +998,18 @@ def update_winaiorepair():
|
|||
# Stop running processes
|
||||
kill_process('Repair_Windows.exe')
|
||||
|
||||
# Remove existing folders
|
||||
remove_from_kit('WinAIO Repair')
|
||||
|
||||
# Download
|
||||
download_to_temp('winaio.zip', SOURCE_URLS['WinAIO Repair'])
|
||||
|
||||
# Extract
|
||||
extract_temp_to_cbin('winaio.zip', 'WinAIO Repair')
|
||||
dest = r'{}\WinAIO Repair'.format(global_vars['CBinDir'])
|
||||
extract_temp_to_cbin('winaio.zip', 'WinAIORepair')
|
||||
dest = r'{}\WinAIORepair'.format(global_vars['CBinDir'])
|
||||
for item in os.scandir(r'{}\Tweaking.com - Windows Repair'.format(dest)):
|
||||
dest_item = '{}\{}'.format(dest, item.name)
|
||||
if not os.path.exists(dest_item):
|
||||
shutil.move(item.path, dest_item)
|
||||
shutil.rmtree(
|
||||
r'{}\WinAIO Repair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir']))
|
||||
r'{}\WinAIORepair\Tweaking.com - Windows Repair'.format(global_vars['CBinDir']))
|
||||
|
||||
# Cleanup
|
||||
remove_from_temp('winaio.zip')
|
||||
|
|
|
|||
Loading…
Reference in a new issue