diff options
author | pommicket <pommicket@gmail.com> | 2023-01-09 23:12:09 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-01-09 23:12:09 -0500 |
commit | edd5188dfba93b8ffe376d0c194804f35f43dcaa (patch) | |
tree | 9e1ef13632c9e0fbfd175bc82c79f874b2b15229 /buffer.c | |
parent | 7f0255cb40bb85276191ec3ddffe507e53abf2ac (diff) |
misc windows fixes
Diffstat (limited to 'buffer.c')
-rw-r--r-- | buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2326,6 +2326,12 @@ Status buffer_load_file(TextBuffer *buffer, const char *path) { if (success) { char *path_copy = buffer_strdup(buffer, path); if (!path_copy) success = false; + #if _WIN32 + // only use \ as a path separator + for (char *p = path_copy; *p; ++p) + if (*p == '/') + *p = '\\'; + #endif if (success) { // everything is good buffer_clear(buffer); |