Skip to content

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
masterfrom
user/oneblue/install-log-symlink
Open

Blue (OneBlue) wants to merge 1 commit into
masterfrom
user/oneblue/install-log-symlink

Conversation

@OneBlue

Copy link
Copy Markdown
Collaborator

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

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@OneBlue
Blue (OneBlue) requested a review from a team as a code owner September 25, 2026 22:22
Copilot AI lite review requested due to automatic review settings September 25, 2026 22:22
@OneBlue Blue (OneBlue) changed the title Don't write to the install log file if it's a reparse point Don't write to the install log file if it's a reparse point or a directory Sep 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants