summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-04-07 14:56:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-04-07 14:56:30 (GMT)
commitb548441f399cf039b31e3f120b693ec61e574e7f (patch)
tree8986fcffb3a653ad2497712c2cc8a50d56de90a6
parent7e30bd73bdf1406fbbff99255256f0b9d2ba0181 (diff)
parent6ccac8d99a336cac2a430cf97f6f77ac66edb7c1 (diff)
downloadtcl-b548441f399cf039b31e3f120b693ec61e574e7f.zip
tcl-b548441f399cf039b31e3f120b693ec61e574e7f.tar.gz
tcl-b548441f399cf039b31e3f120b693ec61e574e7f.tar.bz2
merge trunk
-rw-r--r--generic/tclIO.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 93040dc..33dda35 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -3270,7 +3270,17 @@ Tcl_Close(
Tcl_SetObjResult(interp,
Tcl_NewStringObj(Tcl_PosixError(interp), -1));
}
- flushcode = -1;
+ return TCL_ERROR;
+ }
+ /*
+ * Bug 97069ea11a: set error message if a flush code is set and no error
+ * message set up to now.
+ */
+ if (flushcode != 0 && interp != NULL
+ && 0 == Tcl_GetCharLength(Tcl_GetObjResult(interp)) ) {
+ Tcl_SetErrno(flushcode);
+ Tcl_SetObjResult(interp,
+ Tcl_NewStringObj(Tcl_PosixError(interp), -1));
}
if ((flushcode != 0) || (result != 0)) {
return TCL_ERROR;