From e2f31085f7d43ed5bb1da9c4a7a8563157dcd498 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Mon, 24 Aug 2015 15:49:17 -0400 Subject: [PATCH] loader: get_mgroup filter out non-directories This was implicit because non-directories do not match the heuristics Signed-off-by: Jean Privat --- src/loader.nit | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/loader.nit b/src/loader.nit index 53b2234..2516f3a 100644 --- a/src/loader.nit +++ b/src/loader.nit @@ -388,6 +388,13 @@ redef class ModelBuilder return mgroups[rdp] end + # Filter out non-directories + var stat = dirpath.file_stat + if stat == null or not stat.is_dir then + mgroups[rdp] = null + return null + end + # Hack, a group is determined by one of the following: # * the presence of a honomymous nit file # * the fact that the directory is named `src` -- 1.7.9.5