···1212 try Ok (L.Resolve.open_unconfined ~sw ~mode (Some dirfd) path flags) with Unix.Unix_error _ as e -> Error e in
1313 let y =
1414 Eio_unix.Fd.use_exn "check" dirfd @@ fun dirfd ->
1515- try Ok (L.Resolve.open_beneath_fallback ~sw ~dirfd ~mode path flags) with Unix.Unix_error _ as e -> Error e
1515+ try Ok (L.Resolve.open_beneath_fallback ~sw ~dirfd ~mode path flags) with
1616+ | Unix.Unix_error _ as e -> Error e
1717+ | Eio.Io _ as e -> Error e
1618 in
1719 match x, y with
1820 | Ok x, Ok y ->
···3032 if x <> y then (
3133 Fmt.failwith "Different errors: %a vs %a" Fmt.exn e1 Fmt.exn e2
3234 )
3333- | Error _, Error _ -> assert false
3535+ | Error (Unix.Unix_error _), Error (Eio.Io (Eio.Fs.E Permission_denied _, _)) -> ()
3636+ | Error e1, Error e2 -> Fmt.failwith "Multiple errors: %a vs %a" Fmt.exn e1 Fmt.exn e2
3437 | Error e, Ok _ -> Fmt.failwith "Only OS open failed: %a" Fmt.exn e
3538 | Ok _, Error e -> Fmt.failwith "Only open_beneath failed: %a" Fmt.exn e
3639