Windows: find_file_in_path: Handle absolute path. #4711

Originally in vim/vim.
This commit is contained in:
Michael Ennen
2016-05-06 01:34:39 +01:00
committed by Justin M. Keyes
parent 5185b75f7e
commit c72b60645c

View File

@@ -1400,8 +1400,14 @@ find_file_in_path_option (
&& (ff_file_to_find[2] == NUL
|| vim_ispathsep(ff_file_to_find[2])))));
if (vim_isAbsName(ff_file_to_find)
/* "..", "../path", "." and "./path": don't use the path_option */
// "..", "../path", "." and "./path": don't use the path_option
|| rel_to_curdir
#if defined(WIN32)
// handle "\tmp" as absolute path
|| vim_ispathsep(ff_file_to_find[0])
// handle "c:name" as absolute path
|| (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':')
#endif
) {
/*
* Absolute path, no need to use "path_option".