From 63bbb9b62fe60765b9101e3622592a2ab120a06d Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 20 Apr 2019 16:47:28 +0100 Subject: Change the file name rules for imports (use / rather than \ on windows) --- src/build_settings.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/build_settings.cpp') diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 2b8f99e4c..d3e892175 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -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); -- cgit v1.2.3