diff src/misc1.c @ 4335:3887b02953ce v7.3.917

updated for version 7.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)
author Bram Moolenaar <bram@vim.org>
date Wed, 24 Apr 2013 17:34:20 +0200
parents 790238e5a46c
children 923277a9cce4
line wrap: on
line diff
--- 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;