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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user