Skip to content

Commit

Permalink
fix extension name
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Sep 21, 2023
1 parent 370dc54 commit 2bda3b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/packager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ pub fn sign_outputs(
for package in packages {
for path in &package.paths.clone() {
let path = if path.is_dir() {
let zip = path.with_extension("tar.gz");
let extension = path.extension().unwrap_or_default().to_string_lossy();
let zip = path.with_extension(format!(
"{}{}tar.gz",
extension,
if extension.is_empty() { "." } else { "" }
));
let dest_file = util::create_file(&zip)?;
let gzip_encoder = libflate::gzip::Encoder::new(dest_file)?;
util::create_tar_from_dir(path, gzip_encoder)?;
Expand Down

0 comments on commit 2bda3b3

Please sign in to comment.