diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-07 14:56:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-04-07 14:56:30 (GMT) |
commit | b548441f399cf039b31e3f120b693ec61e574e7f (patch) | |
tree | 8986fcffb3a653ad2497712c2cc8a50d56de90a6 | |
parent | 7e30bd73bdf1406fbbff99255256f0b9d2ba0181 (diff) | |
parent | 6ccac8d99a336cac2a430cf97f6f77ac66edb7c1 (diff) | |
download | tcl-b548441f399cf039b31e3f120b693ec61e574e7f.zip tcl-b548441f399cf039b31e3f120b693ec61e574e7f.tar.gz tcl-b548441f399cf039b31e3f120b693ec61e574e7f.tar.bz2 |
merge trunk
-rw-r--r-- | generic/tclIO.c | 12 |
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; |