X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/34d0bf15a6f4009de376ceed1d7d5cca24a8dfe7..4c06c59514d3521f8c50c5334fb81fff92a863dc:/lib/lyricli/configuration.rb?ds=sidebyside diff --git a/lib/lyricli/configuration.rb b/lib/lyricli/configuration.rb index 720070c..b90e772 100644 --- a/lib/lyricli/configuration.rb +++ b/lib/lyricli/configuration.rb @@ -56,7 +56,7 @@ module Lyricli def load_config path = File.expand_path(@config_path) - if File.exists?(path) + if File.exist?(path) file = File.new(path, "r") @config = MultiJson.decode(file.read) else @@ -77,8 +77,7 @@ module Lyricli # Loads the default configuration from a JSON file def load_default_config # Load the default - path_root = File.expand_path(File.dirname(__FILE__)) - path = File.join(path_root, @defaults_path) + path = File.join(::Lyricli.root, "config", @defaults_path) if File.exists?(path) file = File.new(path, "r")