blender_vscode icon indicating copy to clipboard operation
blender_vscode copied to clipboard

os.remove(link_path) unreliable

Open BlenderViza opened this issue 6 years ago • 3 comments

I had problems with os.remove(link_path):

File "C:\Users\BlenderViza\.vscode\extensions\jacqueslucke.blender-development-0.0.10\pythonFiles\include\blender_vscode\load_addons.py", line 39
=> PermissionError [WINERROR 5]

As administrator it deletes the targeted directory but not as user => unreliable!

My solution:

import shutil
shutil.rmtree(link_path) 

BlenderViza avatar Mar 06 '19 01:03 BlenderViza

Thanks, not sure if there is a good way to fix it, will see.

JacquesLucke avatar Mar 06 '19 10:03 JacquesLucke