-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: explicitly allow remove root when performing library removal #11352
Conversation
Fixes #11269 Signed-off-by: gnattu <gnattuoc@me.com>
Signed-off-by: gnattu <gnattuoc@me.com>
I can confirm that this fixes the issue, but I'm not completely sold on the solution |
I don't like doing it this way either, any better approach? |
This is an alternate approach which is more proper, but changes all parts that uses/overrides the original ValidateChildren method Signed-off-by: gnattu <gnattuoc@me.com>
I pushed an alternate approach, which looks more proper but it changes the signature of |
Seems like it's neater and I think, personally, the signature changing is fine. |
Signed-off-by: gnattu <gnattuoc@me.com>
My original fix is a complete hack anyway |
Changes
This PR added a workaround to temporarily mark the UserRoot as non-root during library validation for VirtualFolder removal. This is probably not the best solution but I'd like to see any suggestions.
The RootFolder protection is to not accidentally remove the whole library when the path is temporarily unavailable, and is a valid use case. But when the user explicitly asked for removal, we should not protect it. So perhaps
IsRoot
can be renamed to something likeDeleteProtect
?Issues
Fixes #11269