… | |
… | |
23 | use Config; |
23 | use Config; |
24 | use BDB; |
24 | use BDB; |
25 | |
25 | |
26 | use DC; |
26 | use DC; |
27 | |
27 | |
28 | our $ODBDIR = "cfplus-" . BDB::VERSION . "-$Config{archname}"; |
28 | our $ODBDIR = "cfplus-" . BDB::VERSION_MAJOR . "." . BDB::VERSION_MINOR . "-$Config{archname}"; |
29 | our $DBDIR = "client-" . BDB::VERSION . "-$Config{archname}"; |
29 | our $DBDIR = "client-" . BDB::VERSION_MAJOR . "." . BDB::VERSION_MINOR . "-$Config{archname}"; |
30 | our $DB_HOME = "$Deliantra::VARDIR/$DBDIR"; |
30 | our $DB_HOME = "$Deliantra::VARDIR/$DBDIR"; |
31 | |
31 | |
32 | unless (-d $DB_HOME) { |
32 | unless (-d $DB_HOME) { |
33 | if (-d "$Deliantra::VARDIR/$ODBDIR") { |
33 | if (-d "$Deliantra::VARDIR/$ODBDIR") { |
34 | rename "$Deliantra::VARDIR/$ODBDIR", $DB_HOME; |
34 | rename "$Deliantra::VARDIR/$ODBDIR", $DB_HOME; |
… | |
… | |
436 | db_env_txn_checkpoint $DB_ENV, 0, 0, 0, sub { }; |
436 | db_env_txn_checkpoint $DB_ENV, 0, 0, 0, sub { }; |
437 | }; |
437 | }; |
438 | } |
438 | } |
439 | |
439 | |
440 | END { |
440 | END { |
|
|
441 | db_env_txn_checkpoint $DB_ENV, 0, 0, 0 |
|
|
442 | if $DB_ENV; |
|
|
443 | |
441 | undef $TILE_SEQ; |
444 | undef $TILE_SEQ; |
442 | %DB_TABLE = (); |
445 | %DB_TABLE = (); |
443 | undef $DB_ENV; |
446 | undef $DB_ENV; |
444 | } |
447 | } |
445 | |
448 | |