summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-12-03 06:36:04 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-12-03 06:36:04 (GMT)
commit1320303a3a83a32f63deae54d36d1cfe2cdb89e6 (patch)
treebce807685d653d5c7710d357f6d83ae87ca98ef6 /generic
parentfa556f0aad80fad65699c15f325c4374e083f6f5 (diff)
downloadtcl-1320303a3a83a32f63deae54d36d1cfe2cdb89e6.zip
tcl-1320303a3a83a32f63deae54d36d1cfe2cdb89e6.tar.gz
tcl-1320303a3a83a32f63deae54d36d1cfe2cdb89e6.tar.bz2
* generic/tclFileName.c (TclDoGlob): One of the
Tcl_FSMatchInDirectory() calls did not have its return code checked. Some VFS drivers can return TCL_ERROR, and when that's not checked, the error message gets converted into a list of matching files returned by [glob], with ridiculous results.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclFileName.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 15c04d8..c14893f 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.16 2008/08/13 17:59:06 dgp Exp $
+ * RCS: @(#) $Id: tclFileName.c,v 1.40.2.17 2008/12/03 06:36:05 dgp Exp $
*/
#include "tclInt.h"
@@ -2662,10 +2662,10 @@ TclDoGlob(interp, separators, headPtr, tail, types)
nameObj = Tcl_NewStringObj(name, Tcl_DStringLength(headPtr));
Tcl_IncrRefCount(nameObj);
- Tcl_FSMatchInDirectory(interp, Tcl_GetObjResult(interp), nameObj,
- NULL, types);
+ result = Tcl_FSMatchInDirectory(interp, Tcl_GetObjResult(interp),
+ nameObj, NULL, types);
Tcl_DecrRefCount(nameObj);
- return TCL_OK;
+ return result;
}
}