Repository navigation
Startup PWD repair: stop rewriting literal backslashes on Unix - #3594
Merged
Merged
Conversation
Refs #3570 On Unix a backslash is an ordinary filename byte (general.h:264-270 ABSPATH) and GNU set_pwd (variables.c:907) binds the get_working_directory spelling verbatim when the inherited PWD is invalid. The unconditional `\`→`/` replace turned a physical cwd named `cwd\backslash` into the nonexistent `cwd/backslash`, so $PWD pointed at a phantom directory and relative lookups could fail. The rewrite is now Windows-only, next to the already-gated TMPDIR/HOME normalization. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Member
Author
|
【WIN-AGENT-AUDIT】 机制核查:
#3570 形状覆盖核对:
腿(逐项):
F 点:无。 |
Member
Author
|
【队长终裁】PENDING(缺腿) 核过审计报告(6886635499)+ CI 全表。机制经源码 + issue oracle 核对无虞(GNU variables.c:907 set_pwd 绑原样拼写;Unix 反斜杠是普通文件名字节; |
caomengxuan666
marked this pull request as ready for review
November 15, 2026 02:05
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
Refs #3570
On Unix a backslash is an ordinary filename byte (general.h:264-270
ABSPATH) and GNU set_pwd (variables.c:907) binds the
get_working_directory spelling verbatim when the inherited PWD is
invalid. The unconditional
\→/replace turned a physical cwd namedcwd\backslashinto the nonexistentcwd/backslash, so $PWD pointedat a phantom directory and relative lookups could fail. The rewrite is
now Windows-only, next to the already-gated TMPDIR/HOME normalization.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>