Use Dir.pwd instead of "." as the source argument to Post.new, since

this has historically supplied an absolute path in this call.
This commit is contained in:
Matt Ginzton 2013-01-25 15:57:45 -08:00
parent fbc9d0c663
commit c95c5e3b7d
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ module Jekyll
# we can instantiate a post object.
File.open("_posts/tumblr/#{post[:name]}", "w")
tumblr_url = URI.parse(post[:slug]).path
jekyll_url = Jekyll::Post.new(site, ".", "", "tumblr/" + post[:name]).url
jekyll_url = Jekyll::Post.new(site, Dir.pwd, "", "tumblr/" + post[:name]).url
redirect_dir = tumblr_url.sub(/\//, "") + "/"
FileUtils.mkdir_p redirect_dir
File.open(redirect_dir + "index.html", "w") do |f|