Download | Plain Text | No Line Numbers


  1. diff -Naur qmail-scanner-2.02.orig/qmail-scanner-queue.template qmail-scanner-2.02/qmail-scanner-queue.template
  2. --- qmail-scanner-2.02.orig/qmail-scanner-queue.template 2007-08-29 23:39:20.000000000 +0200
  3. +++ qmail-scanner-2.02/qmail-scanner-queue.template 2007-11-14 20:27:25.000000000 +0100
  4. @@ -1974,6 +1974,14 @@
  5. my ($line,%array,$count,$match,$type,$descr,$entry,$descrip,$size);
  6. if ($opt_g) {
  7. print "perlscanner: generate new DB file from $db_filename.txt\n";
  8. + # delete "__db.[DBNAME]" and "__db.[DBNAME].*"
  9. + foreach my $tfile ("__db.$db_filename.db.tmp", <__db.$db_filename.db.tmp.*>) {
  10. + next unless (-e $tfile);
  11. + if (!unlink($tfile)) {
  12. + print "ERROR: cannot remove Berkeley DB tmp file $tfile: $!\n";
  13. + &error_condition("ERROR: cannot remove Berkeley DB tmp file $tfile: $!");
  14. + }
  15. + }
  16. unlink("$db_filename.db.tmp");
  17. tie (%array, 'DB_File', "$db_filename.db.tmp", O_CREAT|O_RDWR, 0640, $DB_HASH ) || &error_condition("cannot open for write $db_filename.db.tmp - $!");
  18.  
  19.