Skip to content

Fix no-reparse directory opens on Windows 10 - #47672

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/2fe81913a7ac8d0122ec423db5750e80241def56
Sep 23, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Fix no-reparse directory opens on Windows 10

Why

Windows 10 rejects the Object Manager drive-letter link when opening a directory with OBJ_DONT_REPARSE, preventing ordinary local-drive paths from opening successfully.

What changed

Resolve drive-letter aliases with QueryDosDeviceW before calling NtCreateFile. Accept only direct disk-volume mappings, rejecting other devices and volume subpaths. Leave filesystem components unresolved so OBJ_DONT_REPARSE continues to reject filesystem reparse points.

Testing

Add tests for drive-root opens and NT path construction using ordinary and verbatim drive paths, plus validation of accepted disk-volume mappings and rejected device or subpath mappings.

## Why

Windows 10 rejects the Object Manager drive-letter link when opening a directory with `OBJ_DONT_REPARSE`, preventing ordinary local-drive paths from opening successfully.

## What changed

Resolve drive-letter aliases with `QueryDosDeviceW` before calling `NtCreateFile`. Accept only direct disk-volume mappings, rejecting other devices and volume subpaths. Leave filesystem components unresolved so `OBJ_DONT_REPARSE` continues to reject filesystem reparse points.

## Testing

Add tests for drive-root opens and NT path construction using ordinary and verbatim drive paths, plus validation of accepted disk-volume mappings and rejected device or subpath mappings.

GitOrigin-RevId: 2fe81913a7ac8d0122ec423db5750e80241def56
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/2fe81913a7ac8d0122ec423db5750e80241def56 branch from a0bb157 to 5f371ba Compare September 23, 2026 21:35
@copyberry
copyberry Bot merged commit 5f371ba into main Sep 23, 2026
1 check failed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/2fe81913a7ac8d0122ec423db5750e80241def56 branch September 23, 2026 21:35
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 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