From 4c5398bc402357468ccb4dfc07d6867a44c18a23 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 13 May 2017 18:17:21 +0200 Subject: 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 --- src/nvim/os/fs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nvim/os') diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index aaa750db50..b9a9480cb8 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -196,11 +196,13 @@ int os_nodetype(const char *name) } /// Gets the absolute path of the currently running executable. +/// May fail if procfs is missing. #6734 +/// @see path_exepath /// -/// @param[out] buffer Returns the path string. +/// @param[out] buffer Full path to the executable. /// @param[in] size Size of `buffer`. /// -/// @return `0` on success, or libuv error code on failure. +/// @return 0 on success, or libuv error code. int os_exepath(char *buffer, size_t *size) FUNC_ATTR_NONNULL_ALL { -- cgit