From 7de56ec852f56aff1e0e302a318767ce5db2682c Mon Sep 17 00:00:00 2001 From: Laytan Date: Mon, 28 Oct 2024 18:58:26 +0100 Subject: [PATCH] fix `#load_directory` including nested directories --- src/check_builtin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index 09e558500..42b9e2180 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -1533,6 +1533,10 @@ gb_internal LoadDirectiveResult check_load_directory_directive(CheckerContext *c for (FileInfo fi : list) { LoadFileCache *cache = nullptr; + if (fi.is_dir) { + continue; + } + if (cache_load_file_directive(c, call, fi.fullpath, err_on_not_found, &cache, LoadFileTier_Contents, /*use_mutex*/false)) { array_add(&file_caches, cache); } else {