lib/propre/settings.rb in propre-0.0.7 vs lib/propre/settings.rb in propre-0.0.8

- old
+ new

@@ -3,10 +3,13 @@ class Settings def initialize(path) @path = path - if !File.exist?(path) then FileUtils.touch(path) end + if !File.exist?(path) + FileUtils.mkdir_p("#{Dir.home}/.config/Propre/") + FileUtils.touch(path) + end conf = YAML.load_file(path) @settings = conf ? conf : Hash.new end def get(key) \ No newline at end of file