Git clone will mkdir itself, so no need to mkdir before. And if FileUtils.mkdir_p fail, it will cause worker thread die, but 'git clone' will not.
Signed-off-by: Li Yuanchao lyc163mail@163.com --- lib/git_mirror.rb | 1 - 1 file changed, 1 deletion(-)
diff --git a/lib/git_mirror.rb b/lib/git_mirror.rb index b153978..c7dd019 100644 --- a/lib/git_mirror.rb +++ b/lib/git_mirror.rb @@ -72,7 +72,6 @@ class GitMirror if File.directory?(mirror_dir) possible_new_refs = git_fetch(mirror_dir) else - FileUtils.mkdir_p(mirror_dir) possible_new_refs = git_clone(fork_info['url'], mirror_dir) end feedback(fork_info['git_repo'], possible_new_refs)