diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-15 14:50:44 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-15 14:50:44 +0000 |
| commit | 2e12c7f63c8f667e3f2834604898ac155a1b421a (patch) | |
| tree | 2e71bfd0c324408ca509a9c09e42c0df04bdf981 /src/parser | |
| parent | 7411d71fbde5d652f04cc8851ed93bd15513968b (diff) | |
Zen facts now only trigger in clean builds (no errors/warnings).
Diffstat (limited to 'src/parser')
| -rw-r--r-- | src/parser/parser_stmt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parser/parser_stmt.c b/src/parser/parser_stmt.c index 24dfa10..6f93dbf 100644 --- a/src/parser/parser_stmt.c +++ b/src/parser/parser_stmt.c @@ -3725,6 +3725,14 @@ ASTNode *parse_import(ParserContext *ctx, Lexer *l) } } + // Canonicalize path to avoid duplicates (for example: "./std/io.zc" vs "std/io.zc") + char *real_fn = realpath(fn, NULL); + if (real_fn) + { + free(fn); + fn = real_fn; + } + // Check if file already imported if (is_file_imported(ctx, fn)) { |
