From d9e6ca1317b5ee2d8232275a8604dec569b81966 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Fri, 11 Oct 2019 02:08:50 +0200 Subject: [PATCH] Don't remove AddOn download_dir on uninstall, do it in CLI's remove instead. --- wau/addons.py | 1 - wau/cli.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/wau/addons.py b/wau/addons.py index 4aef516..46947da 100644 --- a/wau/addons.py +++ b/wau/addons.py @@ -86,7 +86,6 @@ class Addon: def uninstall(self) -> None: logger.info("Uninstalling %s", self) - shutil.rmtree(self.download_dir, ignore_errors=True) for dir in self.dirs: shutil.rmtree(config.ADDONS_DIR.joinpath(dir.name), ignore_errors=True) diff --git a/wau/cli.py b/wau/cli.py index d5302f3..c5846d5 100644 --- a/wau/cli.py +++ b/wau/cli.py @@ -120,6 +120,7 @@ class CLI: for addon in remove: print(f"Removing {addon.name}") addon.uninstall() + shutil.rmtree(addon.download_dir, ignore_errors=True) self.installed_addons.remove(addon) addons.save_installed_addons(self.installed_addons)