0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.3939: MS-Windows: fnamemodify('', ':p') does not work

Problem:    MS-Windows: fnamemodify('', ':p') does not work.
Solution:   Do not consider an empty string a full path. (Yegappan Lakshmanan,
            closes #9428, closes #9427)
This commit is contained in:
Yegappan Lakshmanan
2021-12-29 18:16:21 +00:00
committed by Bram Moolenaar
parent ba26367fea
commit 5a664fe57f
3 changed files with 4 additions and 1 deletions

View File

@@ -390,7 +390,7 @@ mch_isFullName(char_u *fname)
// the same as the name or mch_FullName() fails. However, this has quite a
// bit of overhead, so let's not do that.
if (*fname == NUL)
return TRUE;
return FALSE;
return ((ASCII_ISALPHA(fname[0]) && fname[1] == ':'
&& (fname[2] == '/' || fname[2] == '\\'))
|| (fname[0] == fname[1] && (fname[0] == '/' || fname[0] == '\\')));