You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/02/09 20:02:26 UTC

svn commit: r376388 - /spamassassin/trunk/sa-update.raw

Author: felicity
Date: Thu Feb  9 11:02:25 2006
New Revision: 376388

URL: http://svn.apache.org/viewcvs?rev=376388&view=rev
Log:
after we're done dealing with channels, remove both sets of temp files.  newcf_file could still exist if the only channel we tried to update had an error.

Modified:
    spamassassin/trunk/sa-update.raw

Modified: spamassassin/trunk/sa-update.raw
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/sa-update.raw?rev=376388&r1=376387&r2=376388&view=diff
==============================================================================
--- spamassassin/trunk/sa-update.raw (original)
+++ spamassassin/trunk/sa-update.raw Thu Feb  9 11:02:25 2006
@@ -723,7 +723,12 @@
   dbg("channel: update complete");
 }
 
-unlink $content_file || warn "error: couldn't remove tmpfile $content_file: $!\n";
+# clear out the temp files if they still exist
+foreach ( $newcf_file, $content_file ) {
+  if (-e $_) {
+    unlink $_ || warn "error: can't remove file $_: $!\n";
+  }
+}
 
 dbg("diag: updates complete, exiting with code $exit");
 exit $exit;