[gimp/gimp-2-10] Issue #987 Corrupt 'gimp-metadata' parasite. Parsing XMP data failed.



commit 921ccef1cdf92357e174d7884aba821ee6bc49a4
Author: Jacob Boerema <jgboerema gmail com>
Date:   Fri Jan 22 12:44:00 2021 -0500

    Issue #987 Corrupt 'gimp-metadata' parasite. Parsing XMP data failed.
    
    XMP metadata saved by GIMP 2.8.x or earlier can have duplicate tags
    making the XMP data invalid. There's not much we can do without a
    whole lot of processing and complicated code and even then no
    guarantee we would catch everything.
    
    Instead let's just try to improve the message to the user so they
    will be more likely to understand what's going on.
    
    (cherry picked from commit 6df6332f9b3e1e074395a15349c7e0d8c8186ed0)

 app/xcf/xcf-load.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/app/xcf/xcf-load.c b/app/xcf/xcf-load.c
index d76ddf773d..fe28d2846d 100644
--- a/app/xcf/xcf-load.c
+++ b/app/xcf/xcf-load.c
@@ -418,10 +418,16 @@ xcf_load_image (Gimp     *gimp,
                                             xmp_length - 10,
                                             &my_error))
             {
+              /* XMP metadata from 2.8.x or earlier can be really messed up.
+               * Let's make the message more user friendly so they will
+               * understand that we can't do anything about it.
+               * See issue #987. */
               gimp_message (gimp, G_OBJECT (info->progress),
                             GIMP_MESSAGE_WARNING,
-                            _("Corrupt 'gimp-metadata' parasite discovered.\n"
-                              "XMP data could not be migrated: %s"),
+                            _("Corrupt XMP metadata saved by an older version of "
+                              "GIMP could not be converted and will be ignored.\n"
+                              "If you don't know what XMP is, you most likely don't "
+                              "need it. Reported error: %s."),
                             my_error->message);
               g_clear_error (&my_error);
             }


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