Don't remove AddOn download_dir on uninstall, do it in CLI's remove instead.
This commit is contained in:
parent
7a0114b50c
commit
d9e6ca1317
|
@ -86,7 +86,6 @@ class Addon:
|
||||||
|
|
||||||
def uninstall(self) -> None:
|
def uninstall(self) -> None:
|
||||||
logger.info("Uninstalling %s", self)
|
logger.info("Uninstalling %s", self)
|
||||||
shutil.rmtree(self.download_dir, ignore_errors=True)
|
|
||||||
for dir in self.dirs:
|
for dir in self.dirs:
|
||||||
shutil.rmtree(config.ADDONS_DIR.joinpath(dir.name), ignore_errors=True)
|
shutil.rmtree(config.ADDONS_DIR.joinpath(dir.name), ignore_errors=True)
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ class CLI:
|
||||||
for addon in remove:
|
for addon in remove:
|
||||||
print(f"Removing {addon.name}")
|
print(f"Removing {addon.name}")
|
||||||
addon.uninstall()
|
addon.uninstall()
|
||||||
|
shutil.rmtree(addon.download_dir, ignore_errors=True)
|
||||||
self.installed_addons.remove(addon)
|
self.installed_addons.remove(addon)
|
||||||
addons.save_installed_addons(self.installed_addons)
|
addons.save_installed_addons(self.installed_addons)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue