mirror of
https://github.com/vim/vim.git
synced 2025-10-13 06:54:15 -04:00
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 #4724, closes #4710)
This commit is contained in:
@@ -3058,8 +3058,7 @@ f_executable(typval_T *argvars, typval_T *rettv)
|
||||
char_u *name = tv_get_string(&argvars[0]);
|
||||
|
||||
/* Check in $PATH and also check directly if there is a directory name. */
|
||||
rettv->vval.v_number = mch_can_exe(name, NULL, TRUE)
|
||||
|| (gettail(name) != name && mch_can_exe(name, NULL, FALSE));
|
||||
rettv->vval.v_number = mch_can_exe(name, NULL, TRUE);
|
||||
}
|
||||
|
||||
static garray_T redir_execute_ga;
|
||||
|
Reference in New Issue
Block a user