@@ -1002,30 +1002,30 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
10021002 checksum_value .size = Min (checksum -> len , checksum_value .size );
10031003 }
10041004
1005- // rjf: file name -> normalized file path
1006- String8 file_path = seq_file_name ;
1007- String8 file_path_normalized = lower_from_str8 (scratch2 .arena , str8_skip_chop_whitespace (file_path ));
1005+ // rjf: file name -> sanitized file path
1006+ String8 file_path = seq_file_name ;
1007+ String8 file_path_sanitized = str8_copy (scratch2 .arena , str8_skip_chop_whitespace (file_path ));
10081008 {
1009- PathStyle file_path_normalized_style = path_style_from_str8 (file_path_normalized );
1010- String8List file_path_normalized_parts = str8_split_path (scratch2 .arena , file_path_normalized );
1011- if (file_path_normalized_style == PathStyle_Relative )
1009+ PathStyle file_path_sanitized_style = path_style_from_str8 (file_path_sanitized );
1010+ String8List file_path_sanitized_parts = str8_split_path (scratch2 .arena , file_path_sanitized );
1011+ if (file_path_sanitized_style == PathStyle_Relative )
10121012 {
10131013 String8List obj_folder_path_parts = str8_split_path (scratch2 .arena , obj_folder_path );
1014- str8_list_concat_in_place (& obj_folder_path_parts , & file_path_normalized_parts );
1015- file_path_normalized_parts = obj_folder_path_parts ;
1016- file_path_normalized_style = path_style_from_str8 (obj_folder_path );
1014+ str8_list_concat_in_place (& obj_folder_path_parts , & file_path_sanitized_parts );
1015+ file_path_sanitized_parts = obj_folder_path_parts ;
1016+ file_path_sanitized_style = path_style_from_str8 (obj_folder_path );
10171017 }
1018- str8_path_list_resolve_dots_in_place (& file_path_normalized_parts , file_path_normalized_style );
1019- file_path_normalized = str8_path_list_join_by_style (scratch2 .arena , & file_path_normalized_parts , file_path_normalized_style );
1018+ str8_path_list_resolve_dots_in_place (& file_path_sanitized_parts , file_path_sanitized_style );
1019+ file_path_sanitized = str8_path_list_join_by_style (scratch2 .arena , & file_path_sanitized_parts , file_path_sanitized_style );
10201020 }
10211021
1022- // rjf: normalized file path -> source file node
1023- U64 file_path_normalized_hash = rdi_hash (file_path_normalized .str , file_path_normalized .size );
1024- U64 hit_path_slot = file_path_normalized_hash %hit_path_slots_count ;
1022+ // rjf: sanitized file path -> source file node
1023+ U64 file_path_sanitized_hash = rdi_hash (file_path_sanitized .str , file_path_sanitized .size );
1024+ U64 hit_path_slot = file_path_sanitized_hash %hit_path_slots_count ;
10251025 String8Node * hit_path_node = 0 ;
10261026 for (String8Node * n = hit_path_slots [hit_path_slot ]; n != 0 ; n = n -> next )
10271027 {
1028- if (str8_match (n -> string , file_path_normalized , 0 ))
1028+ if (str8_match (n -> string , file_path_sanitized , 0 ))
10291029 {
10301030 hit_path_node = n ;
10311031 break ;
@@ -1035,11 +1035,11 @@ p2r_convert(Arena *arena, P2R_ConvertParams *params)
10351035 {
10361036 hit_path_node = push_array (scratch2 .arena , String8Node , 1 );
10371037 SLLStackPush (hit_path_slots [hit_path_slot ], hit_path_node );
1038- hit_path_node -> string = file_path_normalized ;
1039- P2R_SrcFileStubNode * stub_n = push_array (scratch .arena , P2R_SrcFileStubNode , 1 );
1038+ hit_path_node -> string = file_path_sanitized ;
1039+ P2R_SrcFileStubNode * stub_n = push_array (scratch2 .arena , P2R_SrcFileStubNode , 1 );
10401040 SLLQueuePush (first_src_file_stub , last_src_file_stub , stub_n );
10411041 src_file_stub_count += 1 ;
1042- stub_n -> v .file_path = str8_copy (scratch .arena , file_path_normalized );
1042+ stub_n -> v .file_path = str8_copy (scratch .arena , file_path_sanitized );
10431043 stub_n -> v .checksum_kind = checksum_kind ;
10441044 stub_n -> v .checksum = str8_copy (scratch .arena , checksum_value );
10451045 }
0 commit comments