Fix pak file name creation

This commit is contained in:
Truman Kilen 2023-08-13 00:51:17 -05:00
parent 543c0927aa
commit 4bc5639d1d

View file

@ -357,12 +357,9 @@ fn unpack(aes_key: Option<aes::Aes256>, action: ActionUnpack) -> Result<(), repa
fn pack(args: ActionPack) -> Result<(), repak::Error> { fn pack(args: ActionPack) -> Result<(), repak::Error> {
let output = args.output.map(PathBuf::from).unwrap_or_else(|| { 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 // NOTE: don't use `with_extension` here because it will replace e.g. the `.1` in
// `test_v1.1`. // `test_v1.1`.
output.push(".pak"); PathBuf::from(format!("{}.pak", args.input))
output
}); });
fn collect_files(paths: &mut Vec<PathBuf>, dir: &Path) -> io::Result<()> { fn collect_files(paths: &mut Vec<PathBuf>, dir: &Path) -> io::Result<()> {