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

patch 8.2.0985: simplify() does not remove slashes from "///path"

Problem:    Simplify() does not remove slashes from "///path".
Solution:   Reduce > 2 slashes to one. (closes #6263)
This commit is contained in:
Bram Moolenaar
2020-06-15 21:41:56 +02:00
parent ab176ce982
commit fdcbe3c3fe
3 changed files with 17 additions and 1 deletions

View File

@@ -2641,6 +2641,14 @@ simplify_filename(char_u *filename)
while (vim_ispathsep(*p));
}
start = p; // remember start after "c:/" or "/" or "///"
#ifdef UNIX
// Posix says that "//path" is unchanged but "///path" is "/path".
if (start > filename + 2)
{
STRMOVE(filename + 1, p);
start = p = filename + 1;
}
#endif
do
{