fix dangling pointer issues in ext2dr
[lunaix-os.git] / lunaix-os / scripts / build-tools / lcfg / builtins.py
index f32b9b6237b23bc8f20f5122722726c23a1cc209..f072303bc2a94f5384a329f011a55034b92c294c 100644 (file)
@@ -13,8 +13,12 @@ def v(env, caller, term):
 def include(env, caller, file):
     fobj = caller.get_fo()
     path = os.path.dirname(fobj.filename())
+    path = join_path(path, file)
+    
+    if os.path.isdir(path):
+        path = join_path(path, "LConfig")
 
-    env.resolve_module(join_path(path, file))
+    env.resolve_module(path)
 
 @contextual("type", caller_type=[LCTermNode])
 def term_type(env, caller, type):