Skip to content

Commit

Permalink
Ensure that .nonadmin files do not exists before asking for privilege…
Browse files Browse the repository at this point in the history
… elevation
  • Loading branch information
marcoesters committed Oct 9, 2024
1 parent efc5afc commit c2fad18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion menuinst/_legacy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def install(path, remove=False, prefix=None, recursing=False, root_prefix=None):
if not sys.platform == 'win32':
raise RuntimeError("menuinst._legacy is only supported on Windows.")

if exists(join(prefix, ".nonadmin")) or exists(join(root_prefix, ".nonadmin")):
if not exists(join(prefix, ".nonadmin")) and not exists(join(root_prefix, ".nonadmin")):
if isUserAdmin():
_install(path, remove, prefix, mode='system', root_prefix=root_prefix)
else:
Expand Down

0 comments on commit c2fad18

Please sign in to comment.