From 331d44dc878cfad981e8217da13b377f96ee8e98 Mon Sep 17 00:00:00 2001 From: Jay Oster Date: Sat, 26 Aug 2023 17:49:43 -0700 Subject: [PATCH] Fix "file not found" error when the crate name contains hyphens The library is written with hyphens replaced with underscores. --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 1a24be6..fcd0c36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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() {