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 389b185..156d5bb 100644 --- a/lib/git_mirror.rb +++ b/lib/git_mirror.rb @@ -128,7 +128,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) - ['DEFAULTS'] entry_list.each do |entry| next if entry.start_with? '.'