summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-08-30 17:35:24 (GMT)
committerhobbs <hobbs>2006-08-30 17:35:24 (GMT)
commit0fbcd16e10654644e7054dfb05b7953c1cb34d34 (patch)
tree0d7304dc471059a18826ec5714be1063cd2f9c40 /generic
parentf6c89ae4247f996475ddfbf89e217b539a3f037a (diff)
downloadtcl-0fbcd16e10654644e7054dfb05b7953c1cb34d34.zip
tcl-0fbcd16e10654644e7054dfb05b7953c1cb34d34.tar.gz
tcl-0fbcd16e10654644e7054dfb05b7953c1cb34d34.tar.bz2
* generic/tclFileName.c (TclDoGlob): match incr with existing decr.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclFileName.c12
1 files 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);