mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 13:58:18 +00:00
fix(windows):exepath, stdpath return wrong slashes #19111
exepath and stdpath should respect shellslash and return path with proper file separator. Closes #13787
This commit is contained in:
@@ -2048,6 +2048,12 @@ static void f_exepath(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
|
||||
(void)os_can_exe(tv_get_string(&argvars[0]), &path, true);
|
||||
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
if (path != NULL) {
|
||||
slash_adjust((char_u *)path);
|
||||
}
|
||||
#endif
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = path;
|
||||
}
|
||||
|
Reference in New Issue
Block a user