[Bf-blender-cvs] [e6ba760ce8f] master: Fix: allow removal of addons that are symlinked
Jacques Lucke
noreply at git.blender.org
Mon Jan 28 10:53:43 CET 2019
Commit: e6ba760ce8fda5cf2e18bf26dddeeabdb4021066
Author: Jacques Lucke
Date: Mon Jan 28 10:52:54 2019 +0100
Branches: master
https://developer.blender.org/rBe6ba760ce8fda5cf2e18bf26dddeeabdb4021066
Fix: allow removal of addons that are symlinked
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D4256
===================================================================
M release/scripts/startup/bl_operators/wm.py
===================================================================
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)
More information about the Bf-blender-cvs
mailing list