diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-12 19:03:32 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-12 19:03:32 +1100 |
| commit | 4cc9318992f394a9334add3fb83445561511b340 (patch) | |
| tree | ac44c1f5c0897c6d3252780e9e6150987b52bd05 /src/server/documents.odin | |
| parent | 69b863acfdb0f8e25caa4fb51f8f3516dc57d5d5 (diff) | |
| parent | 928a6d23dce5c6b519da7ef007148253ff98d35f (diff) | |
Merge pull request #1298 from BradLewis/fix/os-filepath-changes-windows
Fix filepath and os updates on windows
Diffstat (limited to 'src/server/documents.odin')
| -rw-r--r-- | src/server/documents.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/documents.odin b/src/server/documents.odin index b9a50dd..3ac0263 100644 --- a/src/server/documents.odin +++ b/src/server/documents.odin @@ -164,7 +164,7 @@ document_setup :: proc(document: ^Document) { //Right now not all clients return the case correct windows path, and that causes issues with indexing, so we ensure that it's case correct. when ODIN_OS == .Windows { package_name := path.dir(document.uri.path, context.temp_allocator) - forward, _ := filepath.to_slash(common.get_case_sensitive_path(package_name), context.temp_allocator) + forward, _ := filepath.replace_path_separators(common.get_case_sensitive_path(package_name), '/', context.temp_allocator) if forward == "" { document.package_name = package_name } else { @@ -179,9 +179,9 @@ document_setup :: proc(document: ^Document) { fullpath: string if correct == "" { //This is basically here to handle the tests where the physical file doesn't actual exist. - document.fullpath, _ = filepath.to_slash(document.uri.path) + document.fullpath, _ = filepath.replace_path_separators(document.uri.path, '/', context.temp_allocator) } else { - document.fullpath, _ = filepath.to_slash(correct) + document.fullpath, _ = filepath.replace_path_separators(correct, '/', context.temp_allocator) } } else { document.fullpath = document.uri.path |