Skip to content

Path.mkdirs on windows return Permission_denied #819

@fatboyzz

Description

@fatboyzz
open Eio

let create_path env =
  (* "reference" exists, "aaa" does not exists *)
  let path = Path.(env#cwd / "reference" / "aaa") in
  Format.printf "Try to mkdir %a\n" Path.pp path;
  (* Path.mkdir ~perm:0o755 path; *)
  Path.mkdirs ~perm:0o755 path

let () = Eio_main.run @@ fun env -> create_path env

I am on window 11.

Path.mkdir works as expected.
Path.mkdirs return

Try to mkdir <cwd:reference/aaa>
Fatal error: exception Eio.Io Fs Permission_denied Unix_error (Permission denied, "openat", ""),
  examining <cwd:reference>,
  creating directory <cwd:reference/aaa>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions