loader: scan_group does not identify file already identified as group.
authorJean Privat <jean@pryen.org>
Thu, 24 Sep 2015 15:08:27 +0000 (11:08 -0400)
committerJean Privat <jean@pryen.org>
Thu, 24 Sep 2015 15:08:27 +0000 (11:08 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/loader.nit

index 7ff71a6..a914b56 100644 (file)
@@ -532,10 +532,11 @@ redef class ModelBuilder
                        var fp = p/f
                        var g = get_mgroup(fp)
                        # Recursively scan for groups of the same package
-                       if g != null and g.mpackage == mgroup.mpackage then
+                       if g == null then
+                               identify_file(fp)
+                       else if g.mpackage == mgroup.mpackage then
                                scan_group(g)
                        end
-                       identify_file(fp)
                end
        end