lib/ronin/config.rb in ronin-2.0.0 vs lib/ronin/config.rb in ronin-2.0.1

- old
+ new

@@ -58,11 +58,11 @@ # Config.load :sql # # => true # # @api semipublic # - def Config.load(name=nil) + def self.load(name=nil) dir, file = if name then [CONFIG_DIR, "#{name}.rb"] else [PATH, 'config.rb'] end path = File.expand_path(File.join(dir,file)) @@ -78,15 +78,15 @@ # @return [String] # The full path within {TMP_DIR}. # # @api semipublic # - def Config.tmp_dir(sub_path=nil) + def self.tmp_dir(sub_path=nil) if sub_path sub_path = File.expand_path(File.join('',sub_path)) path = File.join(TMP_DIR,sub_path) - FileUtils.mkdir_p(path) unless File.exist?(path) + FileUtils.mkdir_p(path) unless File.directory?(path) return path end return TMP_DIR end