From 01ccc0e8acb2ff1e0ed2a9bbf687e27853ab645d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 26 Apr 2025 02:38:28 -0400 Subject: Check that import is a valid file --- src/tomo.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/tomo.c b/src/tomo.c index f0b4cfca..5c11c912 100644 --- a/src/tomo.c +++ b/src/tomo.c @@ -641,6 +641,8 @@ void build_file_dependency_graph(Path_t path, Table_t *to_compile, Table_t *to_l switch (use->what) { case USE_LOCAL: { Path_t dep_tm = Path$resolved(Path$from_str(use->path), Path$parent(path)); + if (!Path$is_file(dep_tm, true)) + code_err(stmt_ast, "Not a valid file: ", dep_tm); if (is_stale(build_file(path, ".h"), dep_tm)) staleness.h = true; if (is_stale(build_file(path, ".c"), dep_tm)) -- cgit v1.2.3