summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-09-24 00:47:46 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-09-24 08:45:02 +0200
commita7ac54ea20995ecc82ecc6f968fc580b022552ee (patch)
treeeabb57a83950ff93d3907bc7d3bc6e3b35313193 /lib
parent4a4eff2ea8f4e2ad62305b575e1fa42b131d1365 (diff)
TokyoCabinet: more BDB checks
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/registry/tc.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/rbot/registry/tc.rb b/lib/rbot/registry/tc.rb
index ca05ebeb..b4e60d71 100644
--- a/lib/rbot/registry/tc.rb
+++ b/lib/rbot/registry/tc.rb
@@ -212,6 +212,10 @@ class Bot
def upgrade_data2
oldreg = @bot.path 'plugin_registry.db'
+ if not defined? BDB
+ warning "Won't upgrade data: BDB not installed" if File.exist? oldreg
+ return
+ end
newdir = @bot.path 'registry'
if File.exist?(oldreg)
Dir.mkdir(newdir) unless File.exist?(newdir)