summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-08-13 18:14:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-08-13 18:14:43 (GMT)
commitfce0abd807701f8f0b1cbc8f820d3254efdd7f32 (patch)
treede52000037dc9bb6041461d16b1be1efbed5c551 /generic/tclFileName.c
parentd5c768d731847b62f9f74833e68518558dbfa782 (diff)
downloadtcl-fce0abd807701f8f0b1cbc8f820d3254efdd7f32.zip
tcl-fce0abd807701f8f0b1cbc8f820d3254efdd7f32.tar.gz
tcl-fce0abd807701f8f0b1cbc8f820d3254efdd7f32.tar.bz2
* generic/tclFileName.c: Fix for errors handling -types {}
* tests/fileName.test: option to [glob]. [Bug 1750300] Thanks to Matthias Kraft and George Peter Staplin.
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r--generic/tclFileName.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index ce2ee53..999a685 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.89 2008/07/21 21:25:21 nijtmans Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.90 2008/08/13 18:14:44 dgp Exp $
*/
#include "tclInt.h"
@@ -1412,6 +1412,9 @@ Tcl_GlobObjCmd(
*/
Tcl_ListObjLength(interp, typePtr, &length);
+ if (length <= 0) {
+ goto skipTypes;
+ }
globTypes = (Tcl_GlobTypeData *)
TclStackAlloc(interp, sizeof(Tcl_GlobTypeData));
globTypes->type = 0;
@@ -1529,6 +1532,7 @@ Tcl_GlobObjCmd(
}
}
+ skipTypes:
/*
* Now we perform the actual glob below. This may involve joining together
* the pattern arguments, dealing with particular file types etc. We use a