From: Brendan Hansen Date: Thu, 22 Jun 2023 14:17:08 +0000 (-0500) Subject: bugfix: "./" prefix was not working correctly X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=6486bb3ef2d754bcf1e112deb94b080e8e93ab2a;p=onyx.git bugfix: "./" prefix was not working correctly --- diff --git a/compiler/src/onyx.c b/compiler/src/onyx.c index 635eb214..36e0c58f 100644 --- a/compiler/src/onyx.c +++ b/compiler/src/onyx.c @@ -511,6 +511,14 @@ static void context_init(CompileOptions* opts) { bh_arr_new(global_heap_allocator, context.doc_info->structures, 128); bh_arr_new(global_heap_allocator, context.doc_info->enumerations, 128); } + + if (context.options->verbose_output > 0) { + bh_printf("File search path:\n"); + bh_arr_each(const char *, p, context.options->included_folders) { + bh_printf("\t%s\n", *p); + } + bh_printf("\n"); + } } static void context_free() { diff --git a/shared/include/bh.h b/shared/include/bh.h index 1e0be390..d347344a 100644 --- a/shared/include/bh.h +++ b/shared/include/bh.h @@ -1988,7 +1988,7 @@ char* bh_lookup_file(char* filename, char* relative_to, char *suffix, b32 add_su if (bh_file_exists(path)) return bh_path_get_full_name(path, BH_INTERNAL_ALLOCATOR); - return fn; + return path; } if (search_included_folders) {