aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 4c16adde4c..80890acb7d 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1538,6 +1538,13 @@ void simplify_filename(char *filename)
} while (vim_ispathsep(*p));
}
char *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 {
// At this point "p" is pointing to the char following a single "/"