Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
14947:e76fd353ec71 | 14948:cb07193c6257 |
---|---|
4914 else if (STRCMP(hi->hi_key, "cwd") == 0) | 4914 else if (STRCMP(hi->hi_key, "cwd") == 0) |
4915 { | 4915 { |
4916 if (!(supported2 & JO2_CWD)) | 4916 if (!(supported2 & JO2_CWD)) |
4917 break; | 4917 break; |
4918 opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf); | 4918 opt->jo_cwd = get_tv_string_buf_chk(item, opt->jo_cwd_buf); |
4919 if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd)) | 4919 if (opt->jo_cwd == NULL || !mch_isdir(opt->jo_cwd) |
4920 || mch_access((char *)opt->jo_cwd, X_OK) != 0) | |
4920 { | 4921 { |
4921 EMSG2(_(e_invargval), "cwd"); | 4922 EMSG2(_(e_invargval), "cwd"); |
4922 return FAIL; | 4923 return FAIL; |
4923 } | 4924 } |
4924 opt->jo_set2 |= JO2_CWD; | 4925 opt->jo_set2 |= JO2_CWD; |