[gnome-boxes/wip/ricotz/vala: 2/2] archive-reader/writer: Use GLib.List.deep_copy() to fix invalid assignment



commit 775888814680cddab22bdd971d7171d04decbe4c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Nov 4 09:39:01 2018 +0100

    archive-reader/writer: Use GLib.List.deep_copy() to fix invalid assignment
    
    GLib.List<weak Archive.Filter> vs GLib.List<Archive.Filter>

 src/archive-reader.vala | 2 +-
 src/archive-writer.vala | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/archive-reader.vala b/src/archive-reader.vala
index f90cfe57..73886049 100644
--- a/src/archive-reader.vala
+++ b/src/archive-reader.vala
@@ -17,7 +17,7 @@ public ArchiveReader (string                     filename,
         this.filename = filename;
         this.format = format;
         if (filters != null)
-            this.filters = filters.copy ();
+            this.filters = filters.copy_deep((CopyFunc) Object.ref);
 
         open_archive ();
     }
diff --git a/src/archive-writer.vala b/src/archive-writer.vala
index 29cf6edf..ff87c6f7 100644
--- a/src/archive-writer.vala
+++ b/src/archive-writer.vala
@@ -13,7 +13,7 @@ public ArchiveWriter (string                     filename,
                           throws GLib.IOError {
         archive = new Archive.Write ();
         this.format  = format;
-        this.filters = filters.copy ();
+        this.filters = filters.copy_deep((CopyFunc) Object.ref);
 
         prepare_archive ();
         execute_libarchive_function (archive, () => { return archive.open_filename (filename); });


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