summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaz <ndpm13@ch-naseem.com>2025-08-10 08:26:15 +0100
committerNaz <ndpm13@ch-naseem.com>2025-08-10 08:26:15 +0100
commit76aa1312c431cd6e3979125aee84d088f7dfa721 (patch)
treeae3d4bf2c50cc7b3bc0fd406b7799cf6e339975c
parentb7c87f2cd6b2f26ac32616993459857af81aad71 (diff)
🐛fix: avoid copying symlinks to desktop files
-rw-r--r--src/appimage.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/appimage.rs b/src/appimage.rs
index 4fdb244..799e4b0 100644
--- a/src/appimage.rs
+++ b/src/appimage.rs
@@ -59,6 +59,13 @@ impl AppImage {
.stdout(Stdio::null())
.spawn()?
.wait()?;
+ Command::new(&self.file_path)
+ .arg("--appimage-extract")
+ .arg("usr/share/applications/*.desktop")
+ .current_dir(&temp_dir)
+ .stdout(Stdio::null())
+ .spawn()?
+ .wait()?;
// Extract icon
Command::new(&self.file_path)
@@ -161,7 +168,7 @@ impl AppImage {
let mut squashfs_entries = fs::read_dir(&squashfs).await?;
while let Some(entry) = squashfs_entries.next_entry().await? {
if entry.path().extension() == Some("desktop".as_ref()) {
- fs::copy(entry.path(), &desktop_file_paths.0).await?;
+ fs::copy(fs::canonicalize(entry.path()).await?, &desktop_file_paths.0).await?;
self.fix_desktop(&desktop_file_paths.0, icon_found).await?;