Skip to content

Commit

Permalink
Sanitize '$' in split filenames
Browse files Browse the repository at this point in the history
Fixes #29
  • Loading branch information
encounter committed Jan 25, 2024
1 parent 7b7c8ce commit f719318
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/util/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,9 @@ fn auto_unit_name(
let name = sanitize_with_options(&symbol.name, &sanitise_file_name::Options {
length_limit: 20,
..Default::default()
});
})
// Also replace $ to avoid issues with build.ninja
.replace('$', "_");
let mut unit_name = format!("auto_{}_{}", name, section_name.trim_start_matches('.'));
// Ensure the name is unique
if unit_exists(&unit_name, obj, new_splits) {
Expand Down

0 comments on commit f719318

Please sign in to comment.