summaryrefslogtreecommitdiff
path: root/src/os_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 53107d530..97595d6eb 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -2237,7 +2237,11 @@ executable_exists(char *name, char_u **path, int use_path, int use_pathext)
retval = FALSE;
goto theend;
}
- STRCPY(pathbuf, ".;");
+
+ if (mch_getenv("NoDefaultCurrentDirectoryInExePath") == NULL)
+ STRCPY(pathbuf, ".;");
+ else
+ *pathbuf = NUL;
STRCAT(pathbuf, p);
}
}