Skip to content

Commit

Permalink
Fix "file not found" error when the crate name contains hyphens
Browse files Browse the repository at this point in the history
The library is written with hyphens replaced with underscores.
  • Loading branch information
parasyte committed Aug 27, 2023
1 parent 6d046ce commit 331d44d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ impl Build {
.and_then(|target| target.metadata.as_ref())
.and_then(|metadata| metadata.name.clone())
.unwrap_or(to_title_case(&target_name));
let target_name = target_name.replace('-', "_");
let source_path = self.make_source_dir(&overall_target_dir, &game_title)?;
let dest_path = overall_target_dir.join(format!("{}.pdx", &game_title));
if dest_path.exists() {
Expand Down

0 comments on commit 331d44d

Please sign in to comment.