Skip to content

Commit c099bee

Browse files
fix: generated files had unusual names
1 parent 641cd6c commit c099bee

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/archive.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ pub fn extract_file(path: &Path, archive_type: &ArchiveType) -> Vec<PathBuf> {
8080

8181
/// Packs the given [dir_path] as a ZIP archive with a custom [prefix].
8282
pub fn pack_dir(dir_path: &Path, output_dir: &Path, prefix: &str) {
83-
let archive_basename = dir_path.file_stem().unwrap().to_str().unwrap();
83+
let archive_basename = if prefix.eq(".x.aix") {
84+
dir_path.file_name().unwrap().to_str().unwrap()
85+
} else {
86+
dir_path.file_stem().unwrap().to_str().unwrap()
87+
};
88+
8489
let out_path = output_dir.join(format!("{}{}", archive_basename, prefix));
8590

8691
// If the ...x.aix/a already exists in the output dir, delete it.

0 commit comments

Comments
 (0)