diff options
| author | gingerBill <bill@gingerbill.org> | 2019-04-20 16:47:28 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-04-20 16:47:28 +0100 |
| commit | 63bbb9b62fe60765b9101e3622592a2ab120a06d (patch) | |
| tree | 8b780826b1ab79edd8d8372d5cb4866dec3bfa65 /src/common.cpp | |
| parent | 56c4039e72e569448e8d2fc79a40245e1dc13efa (diff) | |
Change the file name rules for imports (use / rather than \ on windows)
Diffstat (limited to 'src/common.cpp')
| -rw-r--r-- | src/common.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |