-
Notifications
You must be signed in to change notification settings - Fork 47
Allow uninstalling user shortcuts as administrators #414
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
Allow uninstalling user shortcuts as administrators #414
Conversation
|
Nice! You are changing the returned values so they are only returned if they actually existed and were removed. This allows to check whether something happened as an admin, and fallback to user shortcuts if the installation paths are marked as .nonadmin. I only have a few suggestions about actually checking for files and not just existence, because otherwise the |
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
Description
menuinstcan install shortcuts into user-specific or system locations, depending on whether the user is administrator or not and whether the.nonadminfile is in the target or the base prefix. If the user is administrator,.nonadminfiles are ignored. Uninstalling shortcuts follows the same principle:menuinstsearches for system locations if the user is administrator or if no.nonadminfiles are present.This causes an inconsistency if the user is not an administrator at installation, but an administrator at uninstallation. This is not an uncommon scenario since uninstallers may be invoked with elevated privileges by default. This causes shortcuts to be left behind.
This PR implements a heuristic for uninstallations to check user locations if:
.nonadminfile is present in the target or the base prefix.Closes #341
Checklist - did you ...
newsdirectory (using the template) for the next release's release notes?