Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.remove(link_path) unreliable #29

Open
BlenderViza opened this issue Mar 6, 2019 · 3 comments
Open

os.remove(link_path) unreliable #29

BlenderViza opened this issue Mar 6, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@BlenderViza
Copy link

BlenderViza commented Mar 6, 2019

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) 
@JacquesLucke
Copy link
Owner

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

@tubiana
Copy link

tubiana commented Jun 22, 2023

Hi, coming back on this issue, was it integrated ? Because I still have the same issue...
Thank you :)

@Mateusz-Grzelinski
Copy link
Collaborator

Mateusz-Grzelinski commented Aug 11, 2024

shutil.rmtree will remove files what might lead to data loss, so I will not use that.
#172 will help a little bit but #184 is really what will help here, but is very, very not ready.

At least that is what I think, because Permission error occurs in couple of different (very ugly) corner cases.

@Mateusz-Grzelinski Mateusz-Grzelinski added the bug Something isn't working label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants