summaryrefslogtreecommitdiff
path: root/src/findfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/findfile.c')
-rw-r--r--src/findfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/findfile.c b/src/findfile.c
index 2139d8bae..b153ed010 100644
--- a/src/findfile.c
+++ b/src/findfile.c
@@ -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
{