From ad144990eb7e64bda6656f9ea2ad30974b550879 Mon Sep 17 00:00:00 2001 From: Frank Rehwinkel Date: Sat, 4 Feb 2023 10:04:33 -0500 Subject: [PATCH] fix: fs::create_dir mode The io-uring MkDirAt defaults to creating directories with mode 0. Fix our fs::create_dir to use a mode of 0o777. A DirBuilder that allows setting the mode is coming shortly. --- src/io/mkdir_at.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/io/mkdir_at.rs b/src/io/mkdir_at.rs index cd4b9b53..5f357bec 100644 --- a/src/io/mkdir_at.rs +++ b/src/io/mkdir_at.rs @@ -26,7 +26,9 @@ impl Op { .submit_op(Mkdir { _path }, |mkdir| { let p_ref = mkdir._path.as_c_str().as_ptr(); - opcode::MkDirAt::new(types::Fd(libc::AT_FDCWD), p_ref).build() + opcode::MkDirAt::new(types::Fd(libc::AT_FDCWD), p_ref) + .mode(0o777) + .build() }) }) }