From 76aa1312c431cd6e3979125aee84d088f7dfa721 Mon Sep 17 00:00:00 2001 From: Naz Date: Sun, 10 Aug 2025 08:26:15 +0100 Subject: =?UTF-8?q?=F0=9F=90=9Bfix:=20avoid=20copying=20symlinks=20to=20de?= =?UTF-8?q?sktop=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/appimage.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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?; -- cgit v1.2.3