Skip to content

Fix some ICO files not converting to PNG#4417

Merged
mirkobrombin merged 1 commit intobottlesdevs:mainfrom
ignapk:ignapk/workaround-libmagic-bug
Mar 20, 2026
Merged

Fix some ICO files not converting to PNG#4417
mirkobrombin merged 1 commit intobottlesdevs:mainfrom
ignapk:ignapk/workaround-libmagic-bug

Conversation

@ignapk
Copy link
Copy Markdown
Contributor

@ignapk ignapk commented Mar 1, 2026

Description

Some ICO files are incorrectly identified as TARGA by libmagic file utility, used to obtain the MIME type of the extracted icon from the executable while creating a desktop entry using dynamic launcher portal. They are then assumed to be already PNG, and therefore are not correctly converted, which results in failure to validate the icon by the portal.

While this is a libmagic bug, workaround it by assuming that "image/x-tga" MIME type also indicates ICO files.

See https://bugs.astron.com/view.php?id=723

Helps #4402

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Create a desktop entry for NFS most wanted (2012) (NFS13.exe)

Some ICO files are incorrectly identified as TARGA by libmagic file
utility, used to obtain the MIME type of the extracted icon from the
executable while creating a desktop entry using dynamic launcher portal.
They are then assumed to be already PNG, and therefore are not correctly
converted, which results in failure to validate the icon by the portal.

While this is a libmagic bug, workaround it by assuming that
"image/x-tga" MIME type also indicates ICO files.

See https://bugs.astron.com/view.php?id=723

Helps: bottlesdevs#4402
@mirkobrombin
Copy link
Copy Markdown
Member

LGTM

@mirkobrombin mirkobrombin merged commit c328f91 into bottlesdevs:main Mar 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants