summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-08-13 18:12:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-08-13 18:12:55 (GMT)
commit762fa1a537f4ca15376e7da1c87e323eb2e7a60c (patch)
treeed726018a4af09887f994869575e0253fe2487a5 /generic/tclFileName.c
parentce2c116eefb714e8c79c8dda6a244e276f177d8f (diff)
downloadtcl-762fa1a537f4ca15376e7da1c87e323eb2e7a60c.zip
tcl-762fa1a537f4ca15376e7da1c87e323eb2e7a60c.tar.gz
tcl-762fa1a537f4ca15376e7da1c87e323eb2e7a60c.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 80391f7..1c4b97e 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 2007/12/13 15:23:17 dgp Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.86.2.1 2008/08/13 18:12:56 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