diff options
author | dgp <dgp@noemail.net> | 2006-10-02 18:30:36 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2006-10-02 18:30:36 (GMT) |
commit | f9e507a3667330d596cefcaa8318923aa0b6a0fe (patch) | |
tree | 4a2197bb80a84e3bd3d16218835d0563ace47eca /generic/tclFileName.c | |
parent | 6921f1c9b3e3d4157b00a555810357db01ad8e32 (diff) | |
download | tcl-f9e507a3667330d596cefcaa8318923aa0b6a0fe.zip tcl-f9e507a3667330d596cefcaa8318923aa0b6a0fe.tar.gz tcl-f9e507a3667330d596cefcaa8318923aa0b6a0fe.tar.bz2 |
* generic/tclFileName.c (TclGlob): Prevent doubling of directory
separators by [glob]. [Bug 1569042]
FossilOrigin-Name: dfeb6ada5a2865594e1da93cd1ae427e49860287
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r-- | generic/tclFileName.c | 6 |
1 files changed, 5 insertions, 1 deletions
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++; } |