[easytag] Preserve order when copying unsupported tag fields



commit 40a5309fdac75d8427cb2adf4b9cb02e8d189966
Author: David King <amigadave amigadave com>
Date:   Wed Mar 25 14:30:49 2015 +0100

    Preserve order when copying unsupported tag fields

 src/file_tag.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/file_tag.c b/src/file_tag.c
index a3595ca..8239bef 100644
--- a/src/file_tag.c
+++ b/src/file_tag.c
@@ -83,14 +83,15 @@ et_file_tag_copy_other_into (File_Tag *destination,
                              const File_Tag *source)
 {
     GList *l;
+    GList *new_other = NULL;
 
     for (l = source->other; l != NULL; l = g_list_next (l))
     {
-        destination->other = g_list_prepend (destination->other,
-                                             g_strdup ((gchar *)l->data));
+        new_other = g_list_prepend (new_other, g_strdup ((gchar *)l->data));
     }
 
-    destination->other = g_list_reverse (destination->other);
+    new_other = g_list_reverse (new_other);
+    destination->other = g_list_concat (destination->other, new_other);
 }
 
 


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