Permalink
Browse files

Should stop complaining about file existing, Closes gh-29

  • Loading branch information...
1 parent c90e181 commit 7bd7e71b5cb75c95102a28feaf06f2d0b7c8aac4 @EnriqueVidal committed Apr 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/ruby_warrior/player_generator.rb
View
2 lib/ruby_warrior/player_generator.rb
@@ -19,7 +19,7 @@ def previous_level
# TODO refactor and test this method
def generate
if level.number == 1
- FileUtils.mkdir_p(level.player_path)
+ FileUtils.mkdir_p(level.player_path) unless File.exists? level.player_path
FileUtils.cp(templates_path + '/player.rb', level.player_path)
end

0 comments on commit 7bd7e71

Please sign in to comment.