Skip to content

Commit a21b507

Browse files
authored
Merge pull request #742 from talex5/win-openat-debug
eio_windows: improve openat error handling
2 parents 642bdbe + 54df8fd commit a21b507

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- run: opam exec -- dune build
5858
- run: opam exec -- dune runtest
5959
- run: opam exec -- dune exec -- ./examples/net/main.exe
60+
- run: opam exec -- dune exec -- ./examples/fs/main.exe
6061
docker:
6162
runs-on: ubuntu-latest
6263
steps:

lib_eio_windows/eio_windows_stubs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ CAMLprim value caml_eio_windows_unlinkat(value v_dirfd, value v_pathname, value
237237

238238
if (!NT_SUCCESS(r)) {
239239
caml_win32_maperr(RtlNtStatusToDosError(r));
240-
uerror("openat", Nothing);
240+
uerror("openat", v_pathname);
241241
}
242242

243243
// Now close the file to delete it

lib_eio_windows/fs.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ end = struct
8282
let dir = resolve t dir in
8383
Switch.run @@ fun sw ->
8484
let open Low_level in
85-
let dirfd = Low_level.openat ~sw ~nofollow:true dir Flags.Open.(generic_read + synchronise) Flags.Disposition.(open_if) Flags.Create.(directory) in
85+
let dirfd = Err.run (Low_level.openat ~sw ~nofollow:true dir Flags.Open.(generic_read + synchronise) Flags.Disposition.(open_if)) Flags.Create.(directory) in
8686
fn (Some dirfd) leaf
8787
)
8888
) else fn None path

0 commit comments

Comments
 (0)