[easytag] Do not pile up GError in ID3 tag writer



commit 0e3a7f56989e9d20298cd1e82f26dd30e0a587a7
Author: David King <amigadave amigadave com>
Date:   Sun Jul 12 09:24:45 2015 +0100

    Do not pile up GError in ID3 tag writer

 src/tags/id3_tag.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/tags/id3_tag.c b/src/tags/id3_tag.c
index 52813b8..a79a336 100644
--- a/src/tags/id3_tag.c
+++ b/src/tags/id3_tag.c
@@ -194,6 +194,13 @@ id3tag_write_file_v23tag (const ET_File *ETFile,
      * loop with corrupted MP3 files (files containing only zeroes) */
     if (!et_id3tag_check_if_file_is_valid (file, error))
     {
+        if (error)
+        {
+            g_debug ("Error while checking if ID3 tag is valid: %s",
+                     (*error)->message);
+        }
+
+        g_clear_error (error);
         g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_INVAL, "%s",
                      _("Corrupted file"));
         g_object_unref (file);


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