$lasttime = 0;
$fn = "$main::data/dupefile";
-use vars qw($VERSION $BRANCH);
-($VERSION, $BRANCH) = dxver(q$Revision$);
-
sub init
{
+ unlink $fn;
$dbm = tie (%d, 'DB_File', $fn);
- unless ($dbm) {
- eval { untie %d };
- dbg("Dupefile $fn corrupted, removing...");
- unlink $fn;
- $dbm = tie (%d, 'DB_File', $fn) or confess "can't open dupe file: $fn ($!)";
- confess "cannot open $fn $!" unless $dbm;
- }
+ confess "cannot open $fn $!" unless $dbm;
}
sub finish
undef $dbm;
untie %d;
undef %d;
+ unlink $fn;
}
sub check