Repository navigation
Write Windows paths with single backslashes, escape only where read - #34
Merged
Merged
Conversation
The log's formatter wrote every text field with Debug, which doubled each backslash of a path (program="C:\Users\..."): text fields are now quoted as written, and a command's arguments are shown as typed instead of as a Debug list. In the code, the paths and registry keys still written with "\\" become raw strings. Where a reader does take `\` as an escape, one function does it: build.rs writes rc.exe's script from a raw template and passes every value through rc_string, which escapes backslashes and quotes, where only the icon path was escaped before. shell::quoted for PowerShell and JSON's own rules were already right. AGENTS.md now says which readers escape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The log doubled every backslash of a path in its details, for example
program="C:\Users\..."andtask="GameModeExecutor\Watcher". The cause was central: the formatter wrote text fields withDebug./Run /TN "GameModeExecutor\FanControl Game"). Two tests pin this."\\"become raw strings, nine in all.\, one function does it:build.rswrites rc.exe's script from a raw template, and passes every value throughrc_string(backslashes and quotes). Before, only the icon path was escaped.shell::quoted(PowerShell) and JSON were already right.AGENTS.mdsays which readers escape, so nothing is doubled out of caution again..\scripts\build.ps1 testpasses, and the release build embeds the same version resources as before.🤖 Generated with Claude Code