diff options
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index ee669d17237..b9438c275a4 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2170,11 +2170,8 @@ class WM_OT_addon_remove(Operator): addon_utils.disable(self.module, default_set=True) import shutil - if isdir: - if os.path.islink(path): - os.remove(path) - else: - shutil.rmtree(path) + if isdir and (not os.path.islink(path)): + shutil.rmtree(path) else: os.remove(path) |