Sanitize '$' in split filenames

Fixes #29
This commit is contained in:
Luke Street 2024-01-24 23:08:45 -07:00
parent 7b7c8ce251
commit f71931838c
1 changed files with 3 additions and 1 deletions

View File

@ -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) {