aboutsummaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-30 15:20:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-30 15:20:53 -0400
commit50bc9f42d5658818347b50f452445f5bcdb7c75d (patch)
treeea9291e4c91681d0434d60e0fda282605067bdb8 /src/parse.c
parent67f088689019bfc3c731f8157e50c560fabddb04 (diff)
Fix some relative path stuff
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c9
1 files changed, 3 insertions, 6 deletions
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