Navigation Menu

Skip to content

Commit

Permalink
Don't use Pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 29, 2015
1 parent f7166e7 commit 5832a42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Rakefile
Expand Up @@ -32,13 +32,13 @@ end

def download(url, download_dir)
base_name = url.split("/").last
absolute_output_path = download_dir + base_name
absolute_output_path = File.join(download_dir, base_name)

unless absolute_output_path.exist?
unless File.exist?(absolute_output_path)
mkdir_p(download_dir)
rake_output_message "Downloading... #{url}"
open(url) do |downloaded_file|
absolute_output_path.open("wb") do |output_file|
File.open(absolute_output_path, "wb") do |output_file|
output_file.print(downloaded_file.read)
end
end
Expand Down

0 comments on commit 5832a42

Please sign in to comment.