From 50bc9f42d5658818347b50f452445f5bcdb7c75d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Mar 2025 15:20:53 -0400 Subject: Fix some relative path stuff --- src/parse.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index ff46fd03..0eba5d2a 100644 --- a/src/parse.c +++ b/src/parse.c @@ -23,6 +23,7 @@ #include "cordhelpers.h" #include "stdlib/integers.h" #include "stdlib/patterns.h" +#include "stdlib/paths.h" #include "stdlib/print.h" #include "stdlib/stdlib.h" #include "stdlib/tables.h" @@ -2515,12 +2516,8 @@ PARSER(parse_use) { } ast_t *parse_file(const char *path, jmp_buf *on_err) { - if (path[0] != '<') { - const char *resolved = resolve_path(path, ".", "."); - if (!resolved) - print_err("Could not resolve path: ", path); - path = resolved; - } + if (path[0] != '<' && path[0] != '/') + fail("Path is not fully resolved: ", path); // NOTE: this cache leaks a bounded amount of memory. The cache will never // hold more than PARSE_CACHE_SIZE entries (see below), but each entry's // AST holds onto a reference to the file it came from, so they could -- cgit v1.2.3