[gnome-boxes/wip/ricotz/vala] Use GLib.List.deep_copy() to fix invalid assignment in ArchiveReader/Writer



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

    Use GLib.List.deep_copy() to fix invalid assignment in ArchiveReader/Writer
    
    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]