Skip to content

Commit 405df67

Browse files
committed
Fixed output filename creation for WAD convert command
1 parent 74584b1 commit 405df67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/rustii/title/wad.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ pub fn convert_wad(input: &str, target: &ConvertTargets, output: &Option<String>
8989
PathBuf::from(output.clone().unwrap()).with_extension("wad")
9090
} else {
9191
match target {
92-
Target::Retail => PathBuf::from(format!("{}_retail", in_path.file_stem().unwrap().to_str().unwrap())).with_extension("wad"),
93-
Target::Dev => PathBuf::from(format!("{}_dev", in_path.file_stem().unwrap().to_str().unwrap())).with_extension("wad"),
94-
Target::Vwii => PathBuf::from(format!("{}_vWii", in_path.file_stem().unwrap().to_str().unwrap())).with_extension("wad"),
92+
Target::Retail => PathBuf::from(format!("{}_retail.wad", in_path.file_stem().unwrap().to_str().unwrap())),
93+
Target::Dev => PathBuf::from(format!("{}_dev.wad", in_path.file_stem().unwrap().to_str().unwrap())),
94+
Target::Vwii => PathBuf::from(format!("{}_vWii.wad", in_path.file_stem().unwrap().to_str().unwrap())),
9595
}
9696
};
9797
let mut title = title::Title::from_bytes(fs::read(in_path)?.as_slice()).with_context(|| "The provided WAD file could not be parsed, and is likely invalid.")?;

0 commit comments

Comments
 (0)