mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 23:52:22 -07:00
normalize paths when doing file-path <-> eval string
This commit is contained in:
@@ -2846,7 +2846,8 @@ rd_file_path_from_eval_string(Arena *arena, String8 string)
|
||||
E_Eval eval = e_eval_from_string(scratch.arena, string);
|
||||
if(eval.expr->kind == E_ExprKind_LeafFilePath)
|
||||
{
|
||||
result = raw_from_escaped_str8(arena, eval.expr->string);
|
||||
result = raw_from_escaped_str8(scratch.arena, eval.expr->string);
|
||||
result = path_normalized_from_string(arena, result);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
@@ -2857,7 +2858,8 @@ internal String8
|
||||
rd_eval_string_from_file_path(Arena *arena, String8 string)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
String8 string_escaped = escaped_from_raw_str8(scratch.arena, string);
|
||||
String8 string_normalized = path_normalized_from_string(scratch.arena, string);
|
||||
String8 string_escaped = escaped_from_raw_str8(scratch.arena, string_normalized);
|
||||
String8 result = push_str8f(arena, "file:\"%S\"", string_escaped);
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user