summaryrefslogtreecommitdiff
path: root/src/handlers.rs
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2018-09-14 12:30:43 -0700
committerRyan Dahl <ry@tinyclouds.org>2018-09-14 12:30:43 -0700
commit662e57b20adc7bbb7037c116f8f72678017db94e (patch)
tree8c6f4377c4bcaceb59220af438e8dda139f98b6a /src/handlers.rs
parent66c09de967b6bf91cb9c6b2d915ab42efa59c349 (diff)
[fs] Enable mode for `mkdir` on unix (#746)
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs5
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)
}()))
}