diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-16 08:36:27 +1100 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2026-02-16 08:36:27 +1100 |
| commit | 30b507e13ead185fa58e0a00e2181d268ee4a0ca (patch) | |
| tree | 27e0f94ee87252d596ec47df61064b89cb53a047 /src | |
| parent | ffb2796a8d7a8ec485dcd692949e5e1b94e6d359 (diff) | |
Use context allocator instead of temp allocator for document fullpaths on windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/documents.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/documents.odin b/src/server/documents.odin index 3ac0263..b08f223 100644 --- a/src/server/documents.odin +++ b/src/server/documents.odin @@ -168,10 +168,10 @@ document_setup :: proc(document: ^Document) { if forward == "" { document.package_name = package_name } else { - document.package_name = strings.clone(forward) + document.package_name = strings.clone(forward, context.allocator) } } else { - document.package_name = path.dir(document.uri.path) + document.package_name = path.dir(document.uri.path, context.allocator) } when ODIN_OS == .Windows { @@ -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.replace_path_separators(document.uri.path, '/', context.temp_allocator) + document.fullpath, _ = filepath.replace_path_separators(document.uri.path, '/', context.allocator) } else { - document.fullpath, _ = filepath.replace_path_separators(correct, '/', context.temp_allocator) + document.fullpath, _ = filepath.replace_path_separators(correct, '/', context.allocator) } } else { document.fullpath = document.uri.path |