From 9785300d2b82d256ee9ac0eab50a4ddd7e387459 Mon Sep 17 00:00:00 2001 From: Matthias H Date: Sun, 11 Jan 2015 08:26:20 +0100 Subject: rbotdb: use correct bdb adapter for legacy backup --- bin/rbotdb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin') 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 -- cgit v1.2.3