mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-14 14:23:43 +00:00
Change the file name rules for imports (use / rather than \ on windows)
This commit is contained in:
@@ -443,6 +443,13 @@ String path_to_fullpath(gbAllocator a, String s) {
|
||||
text[len] = 0;
|
||||
result = string16_to_string(a, make_string16(text, len));
|
||||
result = string_trim_whitespace(result);
|
||||
|
||||
// Replace Windows style separators
|
||||
for (isize i = 0; i < result.len; i++) {
|
||||
if (result[i] == '\\') {
|
||||
result[i] = '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -471,6 +478,7 @@ String get_fullpath_relative(gbAllocator a, String base_dir, String path) {
|
||||
gb_memmove(str+i, path.text, path.len); i += path.len;
|
||||
str[i] = 0;
|
||||
|
||||
|
||||
String res = make_string(str, i);
|
||||
res = string_trim_whitespace(res);
|
||||
return path_to_fullpath(a, res);
|
||||
|
||||
Reference in New Issue
Block a user