From fa5ee967b1643fdd114d19a71f4d12e10a2b4b54 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 20 Aug 2009 22:08:02 +0000 Subject: * generic/tclFileName.c: Correct result from [glob */test] when * matches something like ~foo. [Bug 2837800] --- ChangeLog | 3 +++ generic/tclFileName.c | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ef505f..48355a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-08-20 Don Porter + * generic/tclFileName.c: Correct result from [glob */test] when * + matches something like ~foo. [Bug 2837800] + * generic/tclPathObj.c: [Bug 2806250] Prevent the storage of strings starting with ~ in the "tail" part (normPathPtr field) of the path intrep when PATHFLAGS != 0. This establishes the assumptions relied diff --git a/generic/tclFileName.c b/generic/tclFileName.c index c56c684..b2d43b9 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.86.2.2 2008/12/03 07:03:13 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.86.2.3 2009/08/20 22:08:03 dgp Exp $ */ #include "tclInt.h" @@ -2350,14 +2350,42 @@ DoGlob( pattern, &dirOnly); *p = save; if (result == TCL_OK) { - int subdirc, i; + int subdirc, i, repair = -1; Tcl_Obj **subdirv; result = Tcl_ListObjGetElements(interp, subdirsPtr, &subdirc, &subdirv); for (i=0; result==TCL_OK && i