diff src/channel.c @ 14948:cb07193c6257 v8.1.0485

patch 8.1.0485: term_start() does not check if directory is accessible commit https://github.com/vim/vim/commit/839e81e12d81377f74ffc03f8645ce52cbc18b13 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 19 16:53:39 2018 +0200 patch 8.1.0485: term_start() does not check if directory is accessible Problem: term_start() does not check if directory is accessible. Solution: Add mch_access() call. (Jason Franklin)
author Bram Moolenaar <Bram@vim.org>
date Fri, 19 Oct 2018 17:00:06 +0200
parents 193471015e1a
children 6783403ff35e
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -4916,7 +4916,8 @@ get_job_options(typval_T *tv, jobopt_T *
 		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;