From 0fbcd16e10654644e7054dfb05b7953c1cb34d34 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 30 Aug 2006 17:35:24 +0000 Subject: * generic/tclFileName.c (TclDoGlob): match incr with existing decr. --- generic/tclFileName.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 0e6c35f..7ed34f7 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.12 2006/05/13 23:21:04 dgp Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.40.2.13 2006/08/30 17:35:24 hobbs Exp $ */ #include "tclInt.h" @@ -2533,17 +2533,17 @@ TclDoGlob(interp, separators, headPtr, tail, types) ret = Tcl_FSMatchInDirectory(interp, Tcl_GetObjResult(interp), head, tail, types); } else { - Tcl_Obj* resultPtr; - /* * We do the recursion ourselves. This makes implementing * Tcl_FSMatchInDirectory for each filesystem much easier. */ Tcl_GlobTypeData dirOnly = { TCL_GLOB_TYPE_DIR, 0, NULL, NULL }; char save = *p; - - *p = '\0'; + Tcl_Obj *resultPtr; + resultPtr = Tcl_NewListObj(0, NULL); + Tcl_IncrRefCount(resultPtr); + *p = '\0'; ret = Tcl_FSMatchInDirectory(interp, resultPtr, head, tail, &dirOnly); *p = save; @@ -2560,7 +2560,7 @@ TclDoGlob(interp, separators, headPtr, tail, types) Tcl_DStringAppend(&ds, Tcl_GetString(elt), -1); if(tclPlatform == TCL_PLATFORM_MAC) { Tcl_DStringAppend(&ds, ":",1); - } else { + } else { Tcl_DStringAppend(&ds, "/",1); } ret = TclDoGlob(interp, separators, &ds, p+1, types); -- cgit v0.12