Skip to content

Commit 0739f71

Browse files
committed
fixed? windows path issue
1 parent 87d29c2 commit 0739f71

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

compiler/src/library_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ static AstInclude* create_load(Context *context, char* filename, int32_t length)
970970

971971
AstInclude* include_node = onyx_ast_node_new(context->ast_alloc, sizeof(AstInclude), Ast_Kind_Load);
972972
include_node->name = bh_strdup_len(context->ast_alloc, filename, length);
973+
bh_path_convert_separators(include_node->name);
973974
include_node->token = &implicit_load_token;
974975

975976
return include_node;

shared/include/bh.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,8 +2228,8 @@ char* bh_path_convert_separators(char* path) {
22282228
#define DIR_SEPARATOR '/'
22292229
#define OTHER_SEPARATOR '\\'
22302230
#elif defined(_BH_WINDOWS)
2231-
#define DIR_SEPARATOR '\\'
2232-
#define OTHER_SEPARATOR '/'
2231+
#define DIR_SEPARATOR '/'
2232+
#define OTHER_SEPARATOR '\\'
22332233
#endif
22342234

22352235
fori (i, 0, (i64) strlen(path)) {

0 commit comments

Comments
 (0)