Skip to content

Commit 2cd0992

Browse files
committed
eio_windows: improve openat error handling
1 parent 642bdbe commit 2cd0992

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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)