Skip to content

Commit

Permalink
Correctly handle relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian Aron Prenner committed Jan 7, 2015
1 parent 432afa2 commit edf7729
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minirake
Expand Up @@ -259,10 +259,10 @@ module MiniRake
MiniRake::FileTask.define_task(args) do |t|
block.call(t) unless block.nil?
dir = args.is_a?(Hash) ? args.keys.first : args
dir.split(File::SEPARATOR).reject(&:empty?).inject("") do |acc, part|
(acc + File::SEPARATOR + part).tap do |d|
(dir.split(File::SEPARATOR) + ['']).inject do |acc, part|
(acc + File::SEPARATOR).tap do |d|
Dir.mkdir(d) unless File.exists? d
end
end + part
end
end
end
Expand Down

0 comments on commit edf7729

Please sign in to comment.