mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Slight change to determine_path_from_string rules
This commit is contained in:
@@ -4197,6 +4197,8 @@ bool is_package_name_reserved(String const &name) {
|
|||||||
bool determine_path_from_string(gbMutex *file_mutex, Ast *node, String base_dir, String original_string, String *path) {
|
bool determine_path_from_string(gbMutex *file_mutex, Ast *node, String base_dir, String original_string, String *path) {
|
||||||
GB_ASSERT(path != nullptr);
|
GB_ASSERT(path != nullptr);
|
||||||
|
|
||||||
|
// NOTE(bill): if file_mutex == nullptr, this means that the code is used within the semantics stage
|
||||||
|
|
||||||
gbAllocator a = heap_allocator();
|
gbAllocator a = heap_allocator();
|
||||||
String collection_name = {};
|
String collection_name = {};
|
||||||
|
|
||||||
@@ -4210,12 +4212,14 @@ bool determine_path_from_string(gbMutex *file_mutex, Ast *node, String base_dir,
|
|||||||
|
|
||||||
bool has_windows_drive = false;
|
bool has_windows_drive = false;
|
||||||
#if defined(GB_SYSTEM_WINDOWS)
|
#if defined(GB_SYSTEM_WINDOWS)
|
||||||
|
if (file_mutex == nullptr) {
|
||||||
if (colon_pos == 1 && original_string.len > 2) {
|
if (colon_pos == 1 && original_string.len > 2) {
|
||||||
if (original_string[2] == '/' || original_string[2] == '\\') {
|
if (original_string[2] == '/' || original_string[2] == '\\') {
|
||||||
colon_pos = -1;
|
colon_pos = -1;
|
||||||
has_windows_drive = true;
|
has_windows_drive = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String file_str = {};
|
String file_str = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user