Skip to content

Commit

Permalink
fix(dmg): canonicalize path returns from create_icns_file
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-crabnebula committed Jul 23, 2024
1 parent 937de61 commit 8d120c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-dmg-failed-with-out-dir.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cargo-packager": patch
---

Fixed dmg failed to bundle the application when out-dir does not exist.
4 changes: 2 additions & 2 deletions crates/packager/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ pub fn create_icns_file(out_dir: &Path, config: &crate::Config) -> crate::Result
);
std::fs::copy(&icon_path, &dest_path)?;

return Ok(Some(dest_path));
return Ok(Some(dunce::canonicalize(dest_path)?));
}
}
}
Expand Down Expand Up @@ -379,7 +379,7 @@ pub fn create_icns_file(out_dir: &Path, config: &crate::Config) -> crate::Result
dest_path.set_extension("icns");
let icns_file = std::io::BufWriter::new(File::create(&dest_path)?);
family.write(icns_file)?;
Ok(Some(dest_path))
Ok(Some(dunce::canonicalize(dest_path)?))
} else {
Err(crate::Error::InvalidIconList)
}
Expand Down

0 comments on commit 8d120c7

Please sign in to comment.