diff options
author | Kevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com> | 2018-09-14 12:30:43 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-09-14 12:30:43 -0700 |
commit | 662e57b20adc7bbb7037c116f8f72678017db94e (patch) | |
tree | 8c6f4377c4bcaceb59220af438e8dda139f98b6a /src/handlers.rs | |
parent | 66c09de967b6bf91cb9c6b2d915ab42efa59c349 (diff) |
[fs] Enable mode for `mkdir` on unix (#746)
Diffstat (limited to 'src/handlers.rs')
-rw-r--r-- | src/handlers.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index 641bfd83c..0917fd22a 100644 --- a/src/handlers.rs +++ b/src/handlers.rs @@ -451,7 +451,7 @@ fn handle_make_temp_dir(d: *const DenoC, base: &msg::Base) -> Box<Op> { fn handle_mkdir(d: *const DenoC, base: &msg::Base) -> Box<Op> { let msg = base.msg_as_mkdir().unwrap(); - // TODO let mode = msg.mode(); + let mode = msg.mode(); let path = msg.path().unwrap(); let deno = from_c(d); if !deno.flags.allow_write { @@ -460,8 +460,7 @@ fn handle_mkdir(d: *const DenoC, base: &msg::Base) -> Box<Op> { // TODO Use tokio_threadpool. Box::new(futures::future::result(|| -> OpResult { debug!("handle_mkdir {}", path); - // TODO(ry) Use mode. - deno_fs::mkdir(Path::new(path))?; + deno_fs::mkdir(Path::new(path), mode)?; Ok(None) }())) } |