mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
6f9b379c08
It is not allowed to be `NULL` or unset if requested by the file attribute matcher. Derive it from the basename. This doesn’t handle the situation of a failed UTF-16 to UTF-8 conversion very well, but will at least return something. Note that the `g_filename_display_basename()` function can’t be used as `GWinHttpFile` provides its URI in UTF-16 rather than in the file system encoding. This fixes a crash when using GIMP on Windows. Thanks to lillolollo for in-depth debugging assistance. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #2194