From 4bc5639d1dec55a71dc4e69c0015ddf6cab21ec9 Mon Sep 17 00:00:00 2001 From: Truman Kilen Date: Sun, 13 Aug 2023 00:51:17 -0500 Subject: [PATCH] Fix pak file name creation --- repak_cli/src/main.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/repak_cli/src/main.rs b/repak_cli/src/main.rs index c19a14c..c03edea 100644 --- a/repak_cli/src/main.rs +++ b/repak_cli/src/main.rs @@ -357,12 +357,9 @@ fn unpack(aes_key: Option, action: ActionUnpack) -> Result<(), repa fn pack(args: ActionPack) -> Result<(), repak::Error> { let output = args.output.map(PathBuf::from).unwrap_or_else(|| { - let mut output = PathBuf::new(); - output.push(&args.input); // NOTE: don't use `with_extension` here because it will replace e.g. the `.1` in // `test_v1.1`. - output.push(".pak"); - output + PathBuf::from(format!("{}.pak", args.input)) }); fn collect_files(paths: &mut Vec, dir: &Path) -> io::Result<()> {