Dir.children returns filenames except for “.” and “..”.
Signed-off-by: Ren Wen 15991987063@163.com --- lib/git_mirror.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/git_mirror.rb b/lib/git_mirror.rb index 9f254f5..dfcc016 100644 --- a/lib/git_mirror.rb +++ b/lib/git_mirror.rb @@ -130,7 +130,7 @@ class MirrorMain def traverse_repodir(repodir) if File.directory? repodir load_defaults(repodir) - entry_list = Dir.entries(repodir) - Array['.', '..', 'DEFAULTS', '.ignore', '.git'] + entry_list = Dir.children(repodir) - Array['DEFAULTS', '.ignore', '.git'] entry_list.each do |entry| traverse_repodir("#{repodir}/#{entry}") end