$dbm = tie (%u, 'DB_File', $ufn, O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn ($!) [rebuild it from user_asc?]";
}
$dbm = tie (%u, 'DB_File', $ufn, O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn ($!) [rebuild it from user_asc?]";
}
+ die "Cannot open $ufn ($!)\n" unless $dbm;
+
$lru = LRU->newbase("DXUser", $lrusize);
# do a conversion if required
$lru = LRU->newbase("DXUser", $lrusize);
# do a conversion if required
- if ($convert) {
+ if ($dbm && $convert) {
my ($key, $val, $action, $count, $err) = ('','',0,0,0);
my %oldu;
dbg("Converting the User File to V3 ");
dbg("This will take a while, I suggest you go and have cup of strong tea");
my ($key, $val, $action, $count, $err) = ('','',0,0,0);
my %oldu;
dbg("Converting the User File to V3 ");
dbg("This will take a while, I suggest you go and have cup of strong tea");
- my $odbm = tie (%oldu, 'DB_File', "$fn.v2", O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn.v2 ($!) [rebuild it from user_asc?]";
+ my $odbm = tie (%oldu, 'DB_File', localdata("users.v2"), O_RDONLY, 0666, $DB_BTREE) or confess "can't open user file: $fn.v2 ($!) [rebuild it from user_asc?]";