diff options
Diffstat (limited to 'src/server/documents.odin')
| -rw-r--r-- | src/server/documents.odin | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/documents.odin b/src/server/documents.odin index ed1fb52..3ac0263 100644 --- a/src/server/documents.odin +++ b/src/server/documents.odin @@ -4,12 +4,10 @@ import "base:intrinsics" import "core:fmt" import "core:log" -import "core:mem" import "core:mem/virtual" import "core:odin/ast" import "core:odin/parser" import "core:odin/tokenizer" -import "core:os" import "core:path/filepath" import path "core:path/slashpath" import "core:strings" @@ -166,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 { @@ -181,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 |