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/common.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index b3169e89f..ed1fd16e2 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -740,7 +740,15 @@ String path_to_full_path(gbAllocator a, String path) { defer (gb_free(ha, path_c)); char *fullpath = gb_path_get_full_name(a, path_c); - return make_string_c(fullpath); + String res = string_trim_whitespace(make_string_c(fullpath)); +#if defined(GB_SYSTEM_WINDOWS) + for (isize i = 0; i < res.len; i++) { + if (res[i] == '\\') { + res[i] = '/'; + } + } +#endif + return res; } -- cgit v1.2.3