mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
fix load directive with absolute paths
This commit is contained in:
@@ -1083,13 +1083,16 @@ gb_internal bool cache_load_file_directive(CheckerContext *c, Ast *call, String
|
|||||||
ast_node(bd, BasicDirective, ce->proc);
|
ast_node(bd, BasicDirective, ce->proc);
|
||||||
String builtin_name = bd->name.string;
|
String builtin_name = bd->name.string;
|
||||||
|
|
||||||
String base_dir = dir_from_path(get_file_path_string(call->file_id));
|
String path;
|
||||||
|
if (gb_path_is_absolute((char*)original_string.text)) {
|
||||||
BlockingMutex *ignore_mutex = nullptr;
|
path = original_string;
|
||||||
String path = {};
|
} else {
|
||||||
bool ok = determine_path_from_string(ignore_mutex, call, base_dir, original_string, &path);
|
String base_dir = dir_from_path(get_file_path_string(call->file_id));
|
||||||
gb_unused(ok);
|
|
||||||
|
|
||||||
|
BlockingMutex *ignore_mutex = nullptr;
|
||||||
|
bool ok = determine_path_from_string(ignore_mutex, call, base_dir, original_string, &path);
|
||||||
|
gb_unused(ok);
|
||||||
|
}
|
||||||
|
|
||||||
MUTEX_GUARD(&c->info->load_file_mutex);
|
MUTEX_GUARD(&c->info->load_file_mutex);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user