Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NtCreateFile to implement open_unchecked on Windows. #293

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

sunfishcode
Copy link
Member

Windows' NtCreateFile has an ability to take a directory and a relative path, so use that to implement open_unchecked instead of using path concatenation.

We still use concatenation for other functions, but this is the first step to rewriting those to avoid it.

Fixes #226.

@sunfishcode sunfishcode force-pushed the sunfishcode/nt-create-file-at-w branch from aed0035 to b2445aa Compare February 3, 2023 20:06
Windows' `NtCreateFile` has an ability to take a directory and a
relative path, so use that to implement `open_unchecked` instead of
using path concatenation.

We still use concatenation for other functions, but this is the first
step to rewriting those to avoid it.

Fixes #226.
@sunfishcode sunfishcode force-pushed the sunfishcode/nt-create-file-at-w branch from b5f68ba to 729cf34 Compare February 3, 2023 22:37
@sunfishcode sunfishcode merged commit 808667d into main Feb 10, 2023
@sunfishcode sunfishcode deleted the sunfishcode/nt-create-file-at-w branch February 10, 2023 20:46
sunfishcode added a commit that referenced this pull request Mar 16, 2023
Windows' `NtCreateFile` has an ability to take a directory and a
relative path, so use that to implement `open_unchecked` instead of
using path concatenation.

We still use concatenation for other functions, but this is the first
step to rewriting those to avoid it.

Fixes #226.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use NtCreateFile on Windows
1 participant