Download | Plain Text | No Line Numbers


  1. diff -Naur qmail-scanner-2.01st.orig/sub-patch-st.pl qmail-scanner-2.01st/sub-patch-st.pl
  2. --- qmail-scanner-2.01st.orig/sub-patch-st.pl 2007-02-04 10:52:04.000000000 +0100
  3. +++ qmail-scanner-2.01st/sub-patch-st.pl 2007-11-14 20:45:25.000000000 +0100
  4. @@ -195,6 +195,14 @@
  5.  
  6. print "\n Generating $settings_per_domain.db\n\n";
  7.  
  8. + # delete "__db.[DBNAME]" and "__db.[DBNAME].*"
  9. + foreach my $tfile ("__db.$settings_per_domain.db.tmp", <__db.$settings_per_domain.db.tmp.*>) {
  10. + next unless (-e $tfile);
  11. + if (!unlink($tfile)) {
  12. + print "ERROR: cannot remove Berkeley DB tmp file $tfile: $!\n";
  13. + return;
  14. + }
  15. + }
  16. unlink ("$settings_per_domain.db.tmp");
  17. tie (%domain_settings,'DB_File',"$settings_per_domain.db.tmp",O_CREAT|O_RDWR,0640,$DB_HASH) || &error_condition("cannot open for write $settings_per_domain.db.tmp - $!");
  18.  
  19.