mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28:17 +00:00
vim-patch:8.1.1740: exepath() doesn't work for "bin/cat" (#10556)
Problem: Exepath() doesn't work for "bin/cat".
Solution: Check for any path separator. (Daniel Hahler, closes vim/vim#4724,
closes vim/vim#4710)
d08b8c4c04
Fixes https://github.com/neovim/neovim/issues/10554.
This commit is contained in:
@@ -8465,10 +8465,7 @@ static void f_executable(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
const char *name = tv_get_string(&argvars[0]);
|
||||
|
||||
// Check in $PATH and also check directly if there is a directory name
|
||||
rettv->vval.v_number = (
|
||||
os_can_exe(name, NULL, true)
|
||||
|| (gettail_dir(name) != name
|
||||
&& os_can_exe(name, NULL, false)));
|
||||
rettv->vval.v_number = os_can_exe(name, NULL, true);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user