diff options
| author | RaphGL <raphfl.dev@gmail.com> | 2024-04-12 13:39:54 -0100 |
|---|---|---|
| committer | RaphGL <raphfl.dev@gmail.com> | 2024-04-12 13:39:54 -0100 |
| commit | e1f65b4875385b9c53e3cc9549c56d1341fe3b1f (patch) | |
| tree | e914f9b642b1fe6d545b84645d78576994a12a8d /src/server | |
| parent | f4f37270d4015c2096b9434efcd6365d7c9f8acc (diff) | |
Added symlinking resolution
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/requests.odin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin index e19c864..891f5f9 100644 --- a/src/server/requests.odin +++ b/src/server/requests.odin @@ -541,6 +541,9 @@ read_ols_initialize_options :: proc( } } + ok: bool + final_path, ok = filepath.abs(final_path, context.temp_allocator) + if !ok do return config.collections[strings.clone(it.name)] = final_path } @@ -549,6 +552,9 @@ read_ols_initialize_options :: proc( if odin_core_env == "" { if exe_path, ok := common.lookup_in_path("odin"); ok { + // ensure that the correct lookup path is found even if symlinked + exe_path, ok = filepath.abs(exe_path, context.temp_allocator) + if !ok do return odin_core_env = filepath.dir(exe_path, context.temp_allocator) } } |