mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
startup: v:progpath fallback: path_guess_exepath
If procfs is missing then libuv cannot find the exe path. Fallback to path_guess_exepath(), adapted from Vim findYourself(). Closes #6734
This commit is contained in:
@@ -1223,7 +1223,8 @@ static void init_path(char *exename)
|
||||
size_t exepathlen = MAXPATHL;
|
||||
// Make v:progpath absolute.
|
||||
if (os_exepath(exepath, &exepathlen) != 0) {
|
||||
EMSG2(e_intern2, "init_path()");
|
||||
// Fall back to argv[0]. Missing procfs? #6734
|
||||
path_guess_exepath(exename, exepath, sizeof(exepath));
|
||||
}
|
||||
set_vim_var_string(VV_PROGPATH, exepath, -1);
|
||||
set_vim_var_string(VV_PROGNAME, (char *)path_tail((char_u *)exename), -1);
|
||||
|
Reference in New Issue
Block a user