nitc: loader skip dot (hidden) directory
authorJean Privat <jean@pryen.org>
Thu, 3 Aug 2017 13:48:23 +0000 (09:48 -0400)
committerJean Privat <jean@pryen.org>
Thu, 3 Aug 2017 13:48:23 +0000 (09:48 -0400)
This will improve the loading time when there is a very
deep .git directory around.

Signed-off-by: Jean Privat <jean@pryen.org>

src/loader.nit

index 1502c40..615aba9 100644 (file)
@@ -135,6 +135,7 @@ redef class ModelBuilder
                                alpha_comparator.sort(fs)
                                # Try each entry as a group or a module
                                for f in fs do
+                                       if f.first == '.' then continue
                                        var af = a/f
                                        mgroup = identify_group(af)
                                        if mgroup != null then
@@ -636,6 +637,7 @@ redef class ModelBuilder
                var files = p.files
                alpha_comparator.sort(files)
                for f in files do
+                       if f.first == '.' then continue
                        var fp = p/f
                        var g = identify_group(fp)
                        # Recursively scan for groups of the same package