diff options
author | dgp <dgp@noemail.net> | 2008-08-13 18:12:54 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2008-08-13 18:12:54 (GMT) |
commit | 40a2877162176e0504d6e91fd2ca75339a23eda8 (patch) | |
tree | ed726018a4af09887f994869575e0253fe2487a5 /generic/tclFileName.c | |
parent | 1ddf07bfb51513a339ea24eba5a33bbc2b13b4e1 (diff) | |
download | tcl-40a2877162176e0504d6e91fd2ca75339a23eda8.zip tcl-40a2877162176e0504d6e91fd2ca75339a23eda8.tar.gz tcl-40a2877162176e0504d6e91fd2ca75339a23eda8.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.
FossilOrigin-Name: 2e92ce0921cab5b3bbc384c63ab37410c393e0bb
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r-- | generic/tclFileName.c | 6 |
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 |