icontheme: detect SVG icons by extension on Win32

Based on the MSYS2 0022-icontheme-win32-detect-SVG-files-by-extension.patch.

Some Windows systems report .svg files with a generic or incorrect content type. On Win32, fall back to the .svg extension so SVG icons can still be detected.
This commit is contained in:
Daemonratte 2026-05-13 10:07:25 +02:00
commit d181fe8fc3

View file

@ -2945,6 +2945,10 @@ icon_info_ensure_scale_and_pixbuf (GtkIconInfo *icon_info,
if (mime_type && strcmp (mime_type, "image/svg+xml") == 0)
is_svg = TRUE;
#ifdef G_OS_WIN32
else if (content_type && strcmp (content_type, ".svg") == 0)
is_svg = TRUE;
#endif
}
g_object_unref (file_info);