From cfffc90b1fd18be77e1b055c32bcccdb9c53bd4d Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 18 Jun 2026 12:55:19 -0400 Subject: [PATCH] dwarfs: make executable for upgrade (ugh) --- internal/appherder/dwarfs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/appherder/dwarfs.go b/internal/appherder/dwarfs.go index c2dcfcb..e3bcabe 100644 --- a/internal/appherder/dwarfs.go +++ b/internal/appherder/dwarfs.go @@ -40,7 +40,6 @@ func openDwarFS(appimagePath string) (fs.FS, func(), error) { func extractCommand(ctx context.Context, appimagePath, destDir string) *exec.Cmd { extract, err := exec.LookPath("dwarfsextract") if err == nil { - // Extract only the desktop entry and icon files. return exec.CommandContext(ctx, extract, "--input="+appimagePath, "--output="+destDir, @@ -50,6 +49,9 @@ func extractCommand(ctx context.Context, appimagePath, destDir string) *exec.Cmd "--pattern=.DirIcon", ) } + // Fall back to the AppImage's own --appimage-extract. The file must be + // executable for this to work. + os.Chmod(appimagePath, 0o755) cmd := exec.CommandContext(ctx, appimagePath, "--appimage-extract") cmd.Dir = destDir return cmd -- 2.51.2