Don't write to the install log file if it's a reparse point or a directory - #41705
Open
Blue (OneBlue) wants to merge 1 commit into
Open
Blue (OneBlue) wants to merge 1 commit into
Blue (OneBlue) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Restore the previous read/write/delete sharing flags to avoid breaking log rotation or backup operations.
Review effort: Lite
Findings: None
What changed in this PR
Updates install-log writing to reject reparse points, directories, and hard-linked files before modification.
Changes:
- Adds validated log-writing implementation logic.
- Preserves error suppression in the logging wrapper.
- Adds unit tests for invalid and valid targets.
| File | Reviewed changes |
|---|---|
test/windows/UnitTests.cpp |
Tests rejected paths and preserved target contents. |
src/windows/common/install.h |
Declares the testable implementation helper. |
src/windows/common/install.cpp |
Validates log targets before writing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Ben Hillis (benhillis)
approved these changes
Sep 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This change updates the WriteInstallLog() logic to refuse to write the file if it's a reparse point.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed