summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-09-23 22:34:08 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-09-23 22:34:08 +0200
commit4a4eff2ea8f4e2ad62305b575e1fa42b131d1365 (patch)
tree6d2133b59fc6dc8e220ae616175abf31fc50acad /lib/rbot
parent087b49a36ccfc1af847bad0baca4e41693c36a30 (diff)
TokyoCabinet: only warn about skipped upgrade if the old reg was found
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/registry/tc.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/registry/tc.rb b/lib/rbot/registry/tc.rb
index b1b811f7..ca05ebeb 100644
--- a/lib/rbot/registry/tc.rb
+++ b/lib/rbot/registry/tc.rb
@@ -191,8 +191,8 @@ class Bot
# NB this function is called _early_ in init(), pretty much all you have to
# work with is @bot.botclass.
def upgrade_data
+ oldreg = @bot.path 'registry.db'
if defined? DBHash
- oldreg = @bot.path 'registry.db'
newreg = @bot.path 'plugin_registry.db'
if File.exist?(oldreg)
log _("upgrading old-style (rbot 0.9.5 or earlier) plugin registry to new format")
@@ -206,7 +206,7 @@ class Bot
File.rename(oldreg, oldreg + ".old")
end
else
- warning "Won't upgrade data: BDB not installed"
+ warning "Won't upgrade data: BDB not installed" if File.exist? oldreg
end
end