Mercurial > vim
comparison src/evalfunc.c @ 17484:f1fd0b0b335c v8.1.1740
patch 8.1.1740: exepath() doesn't work for "bin/cat"
commit https://github.com/vim/vim/commit/d08b8c4c04db9433340df38d21f0e26878f28421
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 24 14:59:45 2019 +0200
patch 8.1.1740: exepath() doesn't work for "bin/cat"
Problem: Exepath() doesn't work for "bin/cat".
Solution: Check for any path separator. (Daniel Hahler, closes https://github.com/vim/vim/issues/4724,
closes #4710)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 24 Jul 2019 15:00:06 +0200 |
parents | dfd87ef822aa |
children | bba80d61ea73 |
comparison
equal
deleted
inserted
replaced
17483:63ea3a9ba8cb | 17484:f1fd0b0b335c |
---|---|
3056 f_executable(typval_T *argvars, typval_T *rettv) | 3056 f_executable(typval_T *argvars, typval_T *rettv) |
3057 { | 3057 { |
3058 char_u *name = tv_get_string(&argvars[0]); | 3058 char_u *name = tv_get_string(&argvars[0]); |
3059 | 3059 |
3060 /* Check in $PATH and also check directly if there is a directory name. */ | 3060 /* Check in $PATH and also check directly if there is a directory name. */ |
3061 rettv->vval.v_number = mch_can_exe(name, NULL, TRUE) | 3061 rettv->vval.v_number = mch_can_exe(name, NULL, TRUE); |
3062 || (gettail(name) != name && mch_can_exe(name, NULL, FALSE)); | |
3063 } | 3062 } |
3064 | 3063 |
3065 static garray_T redir_execute_ga; | 3064 static garray_T redir_execute_ga; |
3066 | 3065 |
3067 /* | 3066 /* |