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



commit 65950de735d5461b6ba9fb30d011b3976d75d792
Author: Jacob Boerema <jgboerema gmail com>
Date:   Sun Aug 8 19:31:14 2021 -0400

    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.

 libgimpbase/gimpmetadata.c | 15 ---------------
 1 file changed, 15 deletions(-)
---
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index dbc3dd9fa6..6df5bb61ef 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]