Skip to content

Avoid reading the current directory when resolving absolute paths - #50558

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6bc6cb43d9f4d57359639708c4d30524d89cfa92
Oct 3, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/6bc6cb43d9f4d57359639708c4d30524d89cfa92

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Avoid reading the current directory when resolving absolute paths

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.

…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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/6bc6cb43d9f4d57359639708c4d30524d89cfa92 branch from 7e82ee0 to 19e554b Compare October 3, 2026 07:14
@copyberry
copyberry Bot merged commit 19e554b into main Oct 3, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/6bc6cb43d9f4d57359639708c4d30524d89cfa92 branch October 3, 2026 07:14
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant