Skip to content

Resolve pasted Windows paths with wslpath in WSL - #61419

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f6a05045b2108722a686e9e5b766fc8cb233bea0
Nov 14, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Resolve pasted Windows paths with wslpath in WSL

Why

Pasted Windows drive paths were mapped unconditionally to /mnt/<drive>, even when that mount was unavailable or WSL used a different mapping.

What changed

Use /bin/wslpath -u with a one-second deadline and require an absolute result. Fall back to /mnt/<drive> only when the helper is missing and /proc/self/mountinfo confirms the mount exists. Reject fallback paths that traverse above the drive root and return no path when conversion fails.

Share the bounded subprocess output helper with tmux probing.

Testing

Update coverage for quoted and unquoted Windows paths with spaces. Add fallback tests for a mounted drive, a missing drive mount, and traversal above the drive root.

## Why

Pasted Windows drive paths were mapped unconditionally to `/mnt/<drive>`, even when that mount was unavailable or WSL used a different mapping.

## What changed

Use `/bin/wslpath -u` with a one-second deadline and require an absolute result. Fall back to `/mnt/<drive>` only when the helper is missing and `/proc/self/mountinfo` confirms the mount exists. Reject fallback paths that traverse above the drive root and return no path when conversion fails.

Share the bounded subprocess output helper with tmux probing.

## Testing

Update coverage for quoted and unquoted Windows paths with spaces. Add fallback tests for a mounted drive, a missing drive mount, and traversal above the drive root.

GitOrigin-RevId: f6a05045b2108722a686e9e5b766fc8cb233bea0
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f6a05045b2108722a686e9e5b766fc8cb233bea0 branch from 2d1027d to 2d5bfb7 Compare November 14, 2026 00:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T00:23:00.903814Z 2d1027d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit 2d5bfb7 into main Nov 14, 2026
12 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f6a05045b2108722a686e9e5b766fc8cb233bea0 branch November 14, 2026 00:22
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 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