comment marking a bug in the code due to unreadable channel
authorVince Darley <vincentdarley@sourceforge.net>
Mon, 13 Sep 2004 16:58:23 +0000 (16:58 +0000)
committerVince Darley <vincentdarley@sourceforge.net>
Mon, 13 Sep 2004 16:58:23 +0000 (16:58 +0000)
generic/vfs.c

index d33806c10ebd395484d335311d2616fc706668c8..af58892c37f716249696fe069f7d0fdfd89b6c9c 100644 (file)
@@ -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) {