diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-26 02:38:28 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-26 02:38:28 -0400 |
| commit | 01ccc0e8acb2ff1e0ed2a9bbf687e27853ab645d (patch) | |
| tree | 7e98a14b1a4acc56049fb5c07f64bb9ae6009a64 /src | |
| parent | a3cc89e160fa8e96121cb10e6f5d7356905a12bd (diff) | |
Check that import is a valid file
Diffstat (limited to 'src')
| -rw-r--r-- | src/tomo.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)) |
