diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-05-02 18:33:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-02 18:33:43 -0400 |
commit | bbbf9f299c284e24882927d34e13ffad1ed6093e (patch) | |
tree | 7ae4e1a565e4a1af992315c3719120826486068f /cli/ops | |
parent | 2872b362ff76273d897d75bb8a3ddd5510c182f4 (diff) |
Deno.chdir should require allow-read not allow-write (#5033)
Diffstat (limited to 'cli/ops')
-rw-r--r-- | cli/ops/fs.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/ops/fs.rs b/cli/ops/fs.rs index 55ee1afa3..cccf32c12 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -254,7 +254,7 @@ fn op_chdir( ) -> Result<JsonOp, OpError> { let args: ChdirArgs = serde_json::from_value(args)?; let d = PathBuf::from(&args.directory); - state.check_write(&d)?; + state.check_read(&d)?; set_current_dir(&d)?; Ok(JsonOp::Sync(json!({}))) } |