Tcl Source Code

Artifact [0cb013e620]
Login

Artifact 0cb013e620471eedefbfaffde4a690f3240c52c9:

Attachment "1569042.patch" to ticket [1569042fff] added by dgp 2006-10-03 01:40:29.
Index: generic/tclFileName.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclFileName.c,v
retrieving revision 1.40.2.13
diff -u -r1.40.2.13 tclFileName.c
--- generic/tclFileName.c	30 Aug 2006 17:35:24 -0000	1.40.2.13
+++ generic/tclFileName.c	2 Oct 2006 18:23:47 -0000
@@ -2130,6 +2130,10 @@
 	     */
 	    if (globFlags & TCL_GLOBMODE_DIR) {
 		Tcl_DStringAppend(&buffer,separators,1);
+		/* Try to borrow that separator from the tail */
+		if (*tail == *separators) {
+		    tail++;
+		}
 	    }
 	    prefixLen++;
 	}