You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by da...@apache.org on 2002/03/05 17:47:19 UTC

cvs commit: tcl-websh/src/generic request.c

davidw      02/03/05 08:47:19

  Modified:    src/generic request.c
  Log:
  * generic/request.c (removeTempFiles): Log error on failure of
    'remove'.
  
  Revision  Changes    Path
  1.8       +9 -5      tcl-websh/src/generic/request.c
  
  Index: request.c
  ===================================================================
  RCS file: /home/cvs/tcl-websh/src/generic/request.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- request.c	27 Feb 2002 10:13:52 -0000	1.7
  +++ request.c	5 Mar 2002 16:47:19 -0000	1.8
  @@ -9,7 +9,7 @@
    * See the file "license.terms" for information on usage and
    * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    *
  - * @(#) $Id: request.c,v 1.7 2002/02/27 10:13:52 davidw Exp $
  + * @(#) $Id: request.c,v 1.8 2002/03/05 16:47:19 davidw Exp $
    *
    */
   #include <tcl.h>
  @@ -208,10 +208,14 @@
   		    "removeTempFiles", WEBLOG_INFO,
   		    "removing temporary file ", Tcl_GetString(tclo), ".",
   		    NULL);
  -	    /* fixme: check for result of remove() --> log message
  -	       Use PosixError
  -	    */
  -	    remove(Tcl_GetString(tclo));
  +
  +	    if (remove(Tcl_GetString(tclo)) < 0) {
  +		LOG_MSG(interp, WRITE_LOG, __FILE__, __LINE__,
  +			"removeTempFiles", WEBLOG_ERROR,
  +			"Error: ", Tcl_PosixError(interp),
  +			NULL);
  +		return TCL_ERROR;
  +	    }
   	    Tcl_DecrRefCount(tclo);
   	}
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org