Skip to content

Use NtCreateFile to implement open_unchecked on Windows.#293

Merged
sunfishcode merged 1 commit intomainfrom
sunfishcode/nt-create-file-at-w
Feb 10, 2023
Merged

Use NtCreateFile to implement open_unchecked on Windows.#293
sunfishcode merged 1 commit intomainfrom
sunfishcode/nt-create-file-at-w

Conversation

@sunfishcode
Copy link
Copy Markdown
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