diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-13 18:17:21 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-05-15 15:01:52 +0200 |
commit | 4c5398bc402357468ccb4dfc07d6867a44c18a23 (patch) | |
tree | 7d0f79e720bcdf0ec1a0f69d0bebf3e203790c54 /src/nvim/os | |
parent | 6e4e70f51b8a889d38fe5d954d9ac817750424c3 (diff) | |
download | rneovim-4c5398bc402357468ccb4dfc07d6867a44c18a23.tar.gz rneovim-4c5398bc402357468ccb4dfc07d6867a44c18a23.tar.bz2 rneovim-4c5398bc402357468ccb4dfc07d6867a44c18a23.zip |
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
Diffstat (limited to 'src/nvim/os')
-rw-r--r-- | src/nvim/os/fs.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 { |