vim-patch:8.2.1575: Vim9: globpath() doesnot take "true" as argument

Problem:    Vim9: globpath() doesnot take "true" as argument.
Solution:   Use tv_get_bool_chk(). (closes vim/vim#6821)

f966ce5ea2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2026-08-08 00:22:39 -04:00
parent f3491ac971
commit b055504d41

View File

@@ -981,16 +981,16 @@ void f_globpath(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
if (argvars[2].v_type != VAR_UNKNOWN) {
// When the optional second argument is non-zero, don't remove matches
// for 'wildignore' and don't put matches for 'suffixes' at the end.
if (tv_get_number_chk(&argvars[2], &error)) {
if (tv_get_bool_chk(&argvars[2], &error)) {
flags |= WILD_KEEP_ALL;
}
if (argvars[3].v_type != VAR_UNKNOWN) {
if (tv_get_number_chk(&argvars[3], &error)) {
if (tv_get_bool_chk(&argvars[3], &error)) {
tv_list_set_ret(rettv, NULL);
}
if (argvars[4].v_type != VAR_UNKNOWN
&& tv_get_number_chk(&argvars[4], &error)) {
&& tv_get_bool_chk(&argvars[4], &error)) {
flags |= WILD_ALLLINKS;
}
}