[gimp] plug-ins: try to get more human-readable information on why g_fopen()...



commit 10d80a6cedbde5f264a62a30496889b7cf4ce5f5
Author: Jehan <jehan girinstud io>
Date:   Sun Dec 17 16:43:57 2017 +0100

    plug-ins: try to get more human-readable information on why g_fopen()...
    
    ... failed.
    See bug 791514. It seems that the file opening fails for webp exporting,
    but the error string is not informative enough.
    As a general rule, we should have as informative errors as possible.

 plug-ins/file-webp/file-webp-save.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/file-webp/file-webp-save.c b/plug-ins/file-webp/file-webp-save.c
index 03b67aa..c810e86 100644
--- a/plug-ins/file-webp/file-webp-save.c
+++ b/plug-ins/file-webp/file-webp-save.c
@@ -178,8 +178,9 @@ save_layer (const gchar    *filename,
         {
           g_set_error (error, G_FILE_ERROR,
                        g_file_error_from_errno (errno),
-                       _("Unable to open '%s' for writing"),
-                       gimp_filename_to_utf8 (filename));
+                       _("Unable to open '%s' for writing: %s"),
+                       gimp_filename_to_utf8 (filename),
+                       g_strerror (errno));
           break;
         }
 
@@ -511,8 +512,9 @@ save_animation (const gchar    *filename,
         {
           g_set_error (error, G_FILE_ERROR,
                        g_file_error_from_errno (errno),
-                       _("Unable to open '%s' for writing"),
-                       gimp_filename_to_utf8 (filename));
+                       _("Unable to open '%s' for writing: %s"),
+                       gimp_filename_to_utf8 (filename),
+                       g_strerror (errno));
           status = FALSE;
           break;
         }


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