libgimpbase: fix #1350 Failure to load metadata importing image with non-latin unicode path

On Windows loading metadata from images with non ASCII characters in their
path failed. Part of the fix is in gexiv2 that now converts the path from
utf-8 to utf-16 on Windows.

However we were still sending a localized path to gexiv2 where it was
expecting utf-8. This caused the conversion and thus loading of metadata
to fail. Fix is to remove the special handling for Windows and use the
utf-8 filename.
This commit is contained in:
Jacob Boerema 2021-08-08 19:31:14 -04:00
parent 4f86d8088d
commit 65950de735

View file

@ -908,22 +908,7 @@ gimp_metadata_load_from_file (GFile *file,
return NULL;
}
#ifdef G_OS_WIN32
filename = g_win32_locale_filename_from_utf8 (path);
/* FIXME!
* This call can return NULL, which later crashes the call to
* gexiv2_metadata_open_path().
* See bug 794949.
*/
if (! filename)
{
g_set_error (error, GIMP_METADATA_ERROR, 0,
_("Conversion of the filename to system codepage failed."));
return NULL;
}
#else
filename = g_strdup (path);
#endif
g_free (path);