Digital-Sapphire / PyUpdater

Pyinstaller auto-update library
https://www.pyupdater.org
460 stars 92 forks source link

False positive `file_requires_admin` on Windows #286

Closed dimitriepirghie closed 2 years ago

dimitriepirghie commented 3 years ago

On Windows OS, module pyupdater.client.updates. file_requires_admin(file_path) function gives false positive, because open(file_path, "a+") on any process image file while it's being running always raises PermissionError exception.

Propose to use this check instead: os.access(file_path, os.W_OK)

JMSwag commented 3 years ago

@dimitriepirghie SGTM

pm990320 commented 3 years ago

Hi I'm also seeing this issue, would it be possible to release the fix?