loader: identify_file do really return null is the path does not exists
authorJean Privat <jean@pryen.org>
Tue, 18 Aug 2015 12:45:17 +0000 (08:45 -0400)
committerJean Privat <jean@pryen.org>
Tue, 18 Aug 2015 18:15:14 +0000 (14:15 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/loader.nit

index 90404ba..f9f9cf7 100644 (file)
@@ -374,6 +374,11 @@ redef class ModelBuilder
                        path = candidate
                end
 
+               # Does the file exists?
+               if not path.file_exists then
+                       return null
+               end
+
                # Fast track, the path is already known
                var pn = path.basename(".nit")
                var rp = module_absolute_path(path)