mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Minor logic change for reserved package names
This commit is contained in:
+7
-4
@@ -4185,6 +4185,12 @@ bool determine_path_from_string(Parser *p, Ast *node, String base_dir, String or
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (is_package_name_reserved(file_str)) {
|
||||||
|
*path = file_str;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
gb_mutex_lock(&p->file_decl_mutex);
|
gb_mutex_lock(&p->file_decl_mutex);
|
||||||
defer (gb_mutex_unlock(&p->file_decl_mutex));
|
defer (gb_mutex_unlock(&p->file_decl_mutex));
|
||||||
|
|
||||||
@@ -4223,12 +4229,9 @@ bool determine_path_from_string(Parser *p, Ast *node, String base_dir, String or
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_package_name_reserved(file_str)) {
|
|
||||||
*path = file_str;
|
|
||||||
} else {
|
|
||||||
String fullpath = string_trim_whitespace(get_fullpath_relative(a, base_dir, file_str));
|
String fullpath = string_trim_whitespace(get_fullpath_relative(a, base_dir, file_str));
|
||||||
*path = fullpath;
|
*path = fullpath;
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user