lib/xp.rb in xp-2.0.1 vs lib/xp.rb in xp-2.0.2

- old
+ new

@@ -14,10 +14,10 @@ user_agent ||= USER_AGENTS[user_agent_alias] open(self, "User-Agent" => user_agent).read end def download(location: 'downloads', name: nil) - FileUtils.mkdir_p location + ::FileUtils.mkdir_p location filename = (name || basename).to_s + extension File.open("#{location}/#{filename}", 'wb') do |f| f.write open(self).read end