File tree Expand file tree Collapse file tree
crates/soar-package/src/formats Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments