projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new version of subprocessing
[spider.git]
/
perl
/
DXDupe.pm
diff --git
a/perl/DXDupe.pm
b/perl/DXDupe.pm
index 851e3a6953eef03450020f399a9efa2b4b17f42f..ebb2aac41a7c157f5be5986c9384cce2143a399a 100644
(file)
--- a/
perl/DXDupe.pm
+++ b/
perl/DXDupe.pm
@@
-17,18
+17,14
@@
use vars qw{$lasttime $dbm %d $default $fn};
$default = 48*24*60*60;
$lasttime = 0;
$default = 48*24*60*60;
$lasttime = 0;
-$fn = "$main::data/dupefile";
+localdata_mv("dupefile");
+$fn = localdata("dupefile");
sub init
{
sub init
{
+ unlink $fn;
$dbm = tie (%d, 'DB_File', $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
}
sub finish
@@
-36,6
+32,7
@@
sub finish
undef $dbm;
untie %d;
undef %d;
undef $dbm;
untie %d;
undef %d;
+ unlink $fn;
}
sub check
}
sub check