Skip to content

Commit

Permalink
Merge pull request ocaml-multicore#742 from talex5/win-openat-debug
Browse files Browse the repository at this point in the history
eio_windows: improve openat error handling
  • Loading branch information
talex5 authored Jun 19, 2024
2 parents 642bdbe + 54df8fd commit a21b507
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
- run: opam exec -- dune build
- run: opam exec -- dune runtest
- run: opam exec -- dune exec -- ./examples/net/main.exe
- run: opam exec -- dune exec -- ./examples/fs/main.exe
docker:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion lib_eio_windows/eio_windows_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ CAMLprim value caml_eio_windows_unlinkat(value v_dirfd, value v_pathname, value

if (!NT_SUCCESS(r)) {
caml_win32_maperr(RtlNtStatusToDosError(r));
uerror("openat", Nothing);
uerror("openat", v_pathname);
}

// Now close the file to delete it
Expand Down
2 changes: 1 addition & 1 deletion lib_eio_windows/fs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end = struct
let dir = resolve t dir in
Switch.run @@ fun sw ->
let open Low_level in
let dirfd = Low_level.openat ~sw ~nofollow:true dir Flags.Open.(generic_read + synchronise) Flags.Disposition.(open_if) Flags.Create.(directory) in
let dirfd = Err.run (Low_level.openat ~sw ~nofollow:true dir Flags.Open.(generic_read + synchronise) Flags.Disposition.(open_if)) Flags.Create.(directory) in
fn (Some dirfd) leaf
)
) else fn None path
Expand Down

0 comments on commit a21b507

Please sign in to comment.