diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-01-29 22:56:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 22:56:35 +0100 |
commit | b55f831678bccc9ca7a2fb9d8123d20985ba3719 (patch) | |
tree | 3e17254f6584d74484cd40bc67372349d7fc7145 /src | |
parent | 9a36337d32481e0324fe85e2b4886e02f8f74a2c (diff) | |
parent | 41b3c7850f839b46affe35bf2de92bc18113b0f7 (diff) | |
download | rneovim-b55f831678bccc9ca7a2fb9d8123d20985ba3719.tar.gz rneovim-b55f831678bccc9ca7a2fb9d8123d20985ba3719.tar.bz2 rneovim-b55f831678bccc9ca7a2fb9d8123d20985ba3719.zip |
Merge #7842 'win: fnamemodify()'
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/path.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index 09cede8805..21ac064c30 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -2202,7 +2202,13 @@ static int path_get_absolute_path(const char_u *fname, char_u *buf, // expand it if forced or not an absolute path if (force || !path_is_absolute_path(fname)) { - if ((p = vim_strrchr(fname, PATHSEP)) != NULL) { + p = vim_strrchr(fname, '/'); +#ifdef WIN32 + if (p == NULL) { + p = vim_strrchr(fname, '\\'); + } +#endif + if (p != NULL) { // relative to root if (p == fname) { // only one path component |