diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-10-19 16:53:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-10-19 16:53:39 +0200 |
commit | 839e81e12d81377f74ffc03f8645ce52cbc18b13 (patch) | |
tree | 2d01fe4dd88ccd631ca24441ffa6c4825b9b3619 /src/channel.c | |
parent | 38654503b04dd5ff4813f81892d9f62db1ff01b9 (diff) |
patch 8.1.0485: term_start() does not check if directory is accessiblev8.1.0485
Problem: term_start() does not check if directory is accessible.
Solution: Add mch_access() call. (Jason Franklin)
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c index aa0a0d38ca..02ed3a8fc7 100644 --- a/src/channel.c +++ b/src/channel.c @@ -4916,7 +4916,8 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) if (!(supported2 & JO2_CWD)) break; opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf); - if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)) + if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd) + || mch_access((char *)opt->jo_cwd, X_OK) != 0) { EMSG2(_(e_invargval), "cwd"); return FAIL; |