microsoft / microsoft/PowerToys
Bug: CopySelfToTempDir uses fixed temp path causing collision
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
Description
CopySelfToTempDir in PowerToys.Update.cpp always writes to %TEMP%\PowerToys.Update.exe. Concurrent update processes overwrite each other's temp binary.
Impact
Low - requires concurrent update attempts which is rare.
Fix
Use a unique temp filename (e.g., append PID or GUID).
Found during multi-agent code review of #46889.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in PowerToys.Update.cpp at CopySelfToTempDir and inspect how the temporary executable path is constructed under %TEMP%. Change the path so concurrent update processes receive distinct filenames, then verify that simultaneous update attempts cannot overwrite the same temporary binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100