Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-01-28 12:52:54 +0300
committerJacques Lucke <mail@jlucke.com>2019-01-28 12:52:54 +0300
commite6ba760ce8fda5cf2e18bf26dddeeabdb4021066 (patch)
treeb43e0cf0f44469b587561c335167d8f677939afd /release
parent534891997a6f4d5a2977e5f3cd0e0b3c3eafe9bd (diff)
Fix: allow removal of addons that are symlinked
Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D4256
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/wm.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 2cdcca562c7..ee669d17237 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2171,7 +2171,10 @@ class WM_OT_addon_remove(Operator):
import shutil
if isdir:
- shutil.rmtree(path)
+ if os.path.islink(path):
+ os.remove(path)
+ else:
+ shutil.rmtree(path)
else:
os.remove(path)