As the file list get by git command will have a '\n' at the end of each line, the method can't find the file with the wrong name.
Signed-off-by: Li Yuanchao lyc163mail@163.com --- lib/git_mirror.rb | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/git_mirror.rb b/lib/git_mirror.rb index 13cb7c0..cc5c7f0 100644 --- a/lib/git_mirror.rb +++ b/lib/git_mirror.rb @@ -268,6 +268,7 @@ class MirrorMain file_list.each_line do |file| next if File.basename(file) == '.ignore'
+ file = file.chomp repo_dir = "#{REPO_DIR}/#{file}" load_repo_file(repo_dir, File.dirname(file), File.basename(file)) if File.file?(repo_dir) end