diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-02-03 13:08:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-03 13:08:38 +0100 |
| commit | 1e87c5bc9732fcda326674283be75272a95f8dd3 (patch) | |
| tree | 7214ad5d341c9581257d2ae1abb70c8f932be27e /src/server/requests.odin | |
| parent | d7531bd1ae6caf7fcd7395195865c553aa2c4ce4 (diff) | |
| parent | b7145b01decc292702f6e39e4a5e69a3d3401615 (diff) | |
Merge pull request #289 from DanielGavin/poly
New poly resolve system
Diffstat (limited to 'src/server/requests.odin')
| -rw-r--r-- | src/server/requests.odin | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index cdd2702..4c653ad 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -10,7 +10,6 @@ import "core:odin/parser" import "core:os" import "core:path/filepath" import path "core:path/slashpath" -import "core:runtime" import "core:slice" import "core:strconv" import "core:strings" @@ -20,6 +19,7 @@ import "core:time" import "shared:common" +import "base:runtime" Header :: struct { content_length: int, @@ -551,6 +551,17 @@ read_ols_initialize_options :: proc( allocator = context.allocator, ) } + + if "base" not_in config.collections && odin_core_env != "" { + forward_path, _ := filepath.to_slash( + odin_core_env, + context.temp_allocator, + ) + config.collections[strings.clone("base")] = path.join( + elems = {forward_path, "base"}, + allocator = context.allocator, + ) + } } request_initialize :: proc( @@ -1077,8 +1088,8 @@ notification_did_save :: proc( fullpath := uri.path p := parser.Parser { - err = log_error_handler, - warn = log_warning_handler, + err = log_error_handler, + warn = log_warning_handler, flags = {.Optional_Semicolons}, } |