summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2015-01-11 08:26:20 +0100
committerMatthias H <apoc@sixserv.org>2015-01-11 08:26:20 +0100
commit9785300d2b82d256ee9ac0eab50a4ddd7e387459 (patch)
treead74664aba341b5d55298b61c894456910ad13a3 /bin
parentbe213d7bbcaf0bd91b4c4e78f1d6a1ae3032978b (diff)
rbotdb: use correct bdb adapter for legacy backup
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rbotdb6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/rbotdb b/bin/rbotdb
index 8fdf7e53..c537187a 100755
--- a/bin/rbotdb
+++ b/bin/rbotdb
@@ -128,7 +128,11 @@ class BackupRegistry
def read_bdb(file)
data = {}
- db = BDB::Hash.open(file.abs, nil, 'r')
+ begin
+ db = BDB::Hash.open(file.abs, nil, 'r')
+ rescue BDB::Fatal
+ db = BDB::Btree.open(file.abs, nil, 'r')
+ end
db.each do |key, value|
data[key] = value
end