changeset 213:f0acb9366e4f noffle

[svn] minor bugfix in Conf_write()
author mirkol
date Thu, 22 Nov 2001 12:05:11 +0000
parents 21200ce10e68
children beb6525f8b44
files src/content.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/content.c	Thu Nov 22 12:04:45 2001 +0000
+++ b/src/content.c	Thu Nov 22 12:05:11 2001 +0000
@@ -1,7 +1,7 @@
 /*
   content.c
 
-  $Id: content.c 316 2001-10-31 11:44:53Z bears $
+  $Id: content.c 332 2001-11-22 12:05:11Z mirkol $
 */
 
 #if HAVE_CONFIG_H
@@ -198,6 +198,7 @@
 	return;
     
     /* Save the overview to temporary file in same dir. */
+    /* old tmpfnames will be expired at noffle.c:expireContents() */
     snprintf( tmpfname, MAXCHAR, "%s/overview/.#%d.%s",
 	      Cfg_spoolDir(), (int) getpid(), cont.name ); 
     if ( ! ( f = fopen( tmpfname, "w" ) ) )
@@ -260,8 +261,8 @@
      */
     if ( ! anythingWritten )
     {
-	if ( unlink( cont.file ) < 0 )
-	    Log_err( "Unlink of %s failed: %s", cont.file, strerror( errno ) );
+	if ( unlink( tmpfname ) < 0 )
+	    Log_err( "Unlink of %s failed: %s", tmpfname, strerror( errno ) );
 	else
 	{
 	    cont.dirty = FALSE;