projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
severe munging of code in prepartion for newprotocol
[spider.git]
/
perl
/
DXDupe.pm
diff --git
a/perl/DXDupe.pm
b/perl/DXDupe.pm
index 4cc2be6ff936fccb7fb6693b642daade97b7ca19..fb1210a2a15b7186c11980712b52ba6120d80a1d 100644
(file)
--- a/
perl/DXDupe.pm
+++ b/
perl/DXDupe.pm
@@
-28,6
+28,13
@@
$main::branch += $BRANCH;
sub init
{
$dbm = tie (%d, 'DB_File', $fn) or confess "can't open dupe file: $fn ($!)";
sub init
{
$dbm = tie (%d, 'DB_File', $fn) or confess "can't open dupe 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;
+ }
}
sub finish
}
sub finish