aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorRui Abreu Ferreira <raf-ep@gmx.com>2016-08-14 11:20:40 +0100
committerRui Abreu Ferreira <raf-ep@gmx.com>2016-08-18 09:41:09 +0100
commit6b94d4d14f701b76b61a2c45862dff98d011f447 (patch)
tree95a87820b82538051e7d7b238ca5c96e4c9a818f /src/nvim/path.c
parent22e9c51b0f24bd8717d9793a35d741adb9ade797 (diff)
downloadrneovim-6b94d4d14f701b76b61a2c45862dff98d011f447.tar.gz
rneovim-6b94d4d14f701b76b61a2c45862dff98d011f447.tar.bz2
rneovim-6b94d4d14f701b76b61a2c45862dff98d011f447.zip
Windows: Check drive letter in absolute paths
Check if drive letter is alphabetic character in path_is_absolute_path().
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 4a47a70799..80eeac9e74 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -2191,7 +2191,7 @@ int path_is_absolute_path(const char_u *fname)
{
#ifdef WIN32
// A name like "d:/foo" and "//server/share" is absolute
- return ((fname[0] && fname[1] == ':' && (fname[2] == '/' || fname[2] == '\\'))
+ return ((isalpha(fname[0]) && fname[1] == ':' && (fname[2] == '/' || fname[2] == '\\'))
|| (fname[0] == fname[1] && (fname[0] == '/' || fname[0] == '\\')));
#else
// UNIX: This just checks if the file name starts with '/' or '~'.