Repository navigation
Avoid reading the current directory when resolving absolute paths - #50558
Merged
copyberry[bot] merged 1 commit intoOct 3, 2026
Conversation
…0558) ## Why `AbsolutePathBuf::relative_to_current_dir` previously read the current directory even for absolute paths, causing resolution to fail if the current directory had been deleted. ## What changed Route absolute inputs through `from_absolute_path` without querying the current directory. Relative inputs continue to resolve against the current directory. ## Testing Extend the Unix regression test to verify that `relative_to_current_dir` succeeds with a deleted current directory and produces the same normalized path as `from_absolute_path`. GitOrigin-RevId: 6bc6cb43d9f4d57359639708c4d30524d89cfa92
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/6bc6cb43d9f4d57359639708c4d30524d89cfa92
branch
from
October 3, 2026 07:14
7e82ee0 to
19e554b
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/6bc6cb43d9f4d57359639708c4d30524d89cfa92
branch
October 3, 2026 07:14
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Avoid reading the current directory when resolving absolute paths
Why
AbsolutePathBuf::relative_to_current_dirpreviously read the current directory even for absolute paths, causing resolution to fail if the current directory had been deleted.What changed
Route absolute inputs through
from_absolute_pathwithout querying the current directory. Relative inputs continue to resolve against the current directory.Testing
Extend the Unix regression test to verify that
relative_to_current_dirsucceeds with a deleted current directory and produces the same normalized path asfrom_absolute_path.