summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-04-24 17:34:20 +0200
committerBram Moolenaar <Bram@vim.org>2013-04-24 17:34:20 +0200
commit811fe63f398767db412c4f21a31f5e746951dd26 (patch)
tree2281a327ca8266e968c5eb52a436786f83f12ac2 /src/misc1.c
parent567199b68fb5a171c0c006e9d4ac94ca61c5cda0 (diff)
updated for version 7.3.917v7.3.917
Problem: When a path ends in a backslash appending a comma has the wrong effect. Solution: Replace a trailing backslash with a slash. (Nazri Ramliy)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 96d268d49d..789aad373b 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -10135,6 +10135,15 @@ expand_path_option(curdir, gap)
if (ga_grow(gap, 1) == FAIL)
break;
+
+# if defined(MSWIN) || defined(MSDOS)
+ /* Avoid the path ending in a backslash, it fails when a comma is
+ * appended. */
+ len = STRLEN(buf);
+ if (buf[len - 1] == '\\')
+ buf[len - 1] = '/';
+# endif
+
p = vim_strsave(buf);
if (p == NULL)
break;