From 1cc358dbc248037ff9ba15eab85cedeea9697019 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 2 Oct 2006 18:30:36 +0000 Subject: * generic/tclFileName.c (TclGlob): Prevent doubling of directory separators by [glob]. [Bug 1569042] --- ChangeLog | 5 +++++ generic/tclFileName.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 56ec2f5..010925f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-02 Don Porter + + * generic/tclFileName.c (TclGlob): Prevent doubling of directory + separators by [glob]. [Bug 1569042] + 2006-10-01 Pat Thoyts * win/tclWinFile.c: Handle possible missing define. diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 7ed34f7..9dce822 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.40.2.13 2006/08/30 17:35:24 hobbs Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.40.2.14 2006/10/02 18:30:40 dgp Exp $ */ #include "tclInt.h" @@ -2130,6 +2130,10 @@ TclGlob(interp, pattern, unquotedPrefix, globFlags, types) */ if (globFlags & TCL_GLOBMODE_DIR) { Tcl_DStringAppend(&buffer,separators,1); + /* Try to borrow that separator from the tail */ + if (*tail == *separators) { + tail++; + } } prefixLen++; } -- cgit v0.12