Skip to content

Commit a7d8a4f

Browse files
committed
fix(integrate): don't treat package binary as desktop file
1 parent 336f2dd commit a7d8a4f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

crates/soar-package/src/formats/common.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ pub async fn integrate_package<P: AsRef<Path>, T: PackageExt>(
378378
let mut has_desktop = false;
379379
let mut has_icon = false;
380380
let mut symlink_action = |path: &Path| -> Result<()> {
381+
// Never treat the package binary itself as a desktop file. Its name can
382+
// legitimately end in `.desktop`, but its contents are the executable.
383+
if path == bin_path.as_path() {
384+
return Ok(());
385+
}
381386
let ext = path.extension();
382387
if ext == Some(OsStr::new("desktop")) {
383388
has_desktop = true;
@@ -388,6 +393,9 @@ pub async fn integrate_package<P: AsRef<Path>, T: PackageExt>(
388393
walk_dir(install_dir, &mut symlink_action)?;
389394

390395
let mut symlink_action = |path: &Path| -> Result<()> {
396+
if path == bin_path.as_path() {
397+
return Ok(());
398+
}
391399
let ext = path.extension();
392400
if ext == Some(OsStr::new("png")) || ext == Some(OsStr::new("svg")) {
393401
has_icon = true;

0 commit comments

Comments
 (0)