Fix: allow removal of addons that are symlinked

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4256
This commit is contained in:
2019-01-28 10:52:54 +01:00
parent 534891997a
commit e6ba760ce8

View File

@@ -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)