From 452e323bfdb73d6b93ab96f5fc417891e4aa8f53 Mon Sep 17 00:00:00 2001 From: Matthias Hecker Date: Wed, 22 Apr 2020 14:40:12 +0200 Subject: [PATCH 1/1] ensures the path reported by gems does exists --- lib/rbot/rbotconfig.rb | 8 ++++++-- 1 file 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 -- 2.39.2