diff options
Diffstat (limited to 'lib/rbot/rbotconfig.rb')
-rw-r--r-- | lib/rbot/rbotconfig.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rbot/rbotconfig.rb b/lib/rbot/rbotconfig.rb index d6f6bcde..894a1b65 100644 --- a/lib/rbot/rbotconfig.rb +++ b/lib/rbot/rbotconfig.rb @@ -37,8 +37,12 @@ class Bot if gem path = gem.full_gem_path debug "installed via rubygems to #{path}" - @@datadir = "#{path}/data/rbot" - @@coredir = "#{path}/lib/rbot/core" + if File.directory? "#{path}/data/rbot" + @@datadir = "#{path}/data/rbot" + end + if File.directory? "#{path}/lib/rbot/core" + @@coredir = "#{path}/lib/rbot/core" + end else debug "not installed via rubygems" end |