changeset 214:beb6525f8b44 noffle

[svn] expireContents() expires overview temporary files
author mirkol
date Thu, 22 Nov 2001 12:05:40 +0000
parents f0acb9366e4f
children 7a2b488e258d
files src/noffle.c
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/noffle.c	Thu Nov 22 12:05:11 2001 +0000
+++ b/src/noffle.c	Thu Nov 22 12:05:40 2001 +0000
@@ -10,7 +10,7 @@
   received for some seconds (to allow multiple clients connect at the same
   time).
 
-  $Id: noffle.c 327 2001-11-14 20:22:22Z mirkol $
+  $Id: noffle.c 333 2001-11-22 12:05:40Z mirkol $
 */
 
 #if HAVE_CONFIG_H
@@ -241,6 +241,7 @@
     int i;
     int cntDel, cntLeft;
     Str grp;
+    Str tmpfname;
     Bool autoUnsubscribe;
     int autoUnsubscribeDays;
     time_t maxAge = 0;
@@ -255,7 +256,18 @@
     Fetchlist_read();
     do
     {
-        if ( ! Grp_exists( grp ) )
+        /* delete tmpfnames. see content.c:Cont_write() */
+        if ( Wld_match(grp, ".#[0123456789][0123456789]*.*" ) )
+        {
+            if ( ( snprintf( tmpfname, MAXCHAR, "%s/overview/%s", \
+              Cfg_spoolDir(), grp ) < 0 ) \
+              || ( unlink( tmpfname ) < 0 ) )
+                Log_err( "Unlink of overview temp file %s failed: %s", \
+                  grp, strerror( errno ) );
+            else
+                Log_err( "Overview temp file %s deleted.", grp );
+        }
+        else if ( ! Grp_exists( grp ) )
             Log_err( "Overview file for unknown group %s exists", grp );
         else
         {