From: Vince Darley Date: Mon, 13 Sep 2004 16:58:23 +0000 (+0000) Subject: comment marking a bug in the code due to unreadable channel X-Git-Tag: vfs-1-4~81 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=320ca5861c6f0b6d38e4188df2b53f25af571bfe;p=tclvfs comment marking a bug in the code due to unreadable channel --- diff --git a/generic/vfs.c b/generic/vfs.c index d33806c..af58892 100644 --- a/generic/vfs.c +++ b/generic/vfs.c @@ -1440,6 +1440,17 @@ VfsCloseProc(ClientData clientData) { * the Tcl code to use the channel's string-name). */ Tcl_RegisterChannel(interp, chan); + + if (!(Tcl_GetChannelMode(chan) & TCL_READABLE)) { + /* + * We need to make this channel readable, since tclvfs + * documents that close callbacks are allowed to read + * from the channels we create. + */ + + /* Currently if we reach here we have a bug */ + } + returnVal = Tcl_EvalObjEx(interp, channelRet->closeCallback, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT); if (returnVal != TCL_OK) {