Commit 445eeb76 authored by Michael Terry's avatar Michael Terry

Deep copy in a way that should still work in latest vala

parent 1a8dfec8
Pipeline #52271 passed with stage
in 7 minutes and 57 seconds
......@@ -31,11 +31,8 @@ public class OperationRestore : Operation
return this._restore_files;
}
construct {
foreach (File f in this._restore_files)
f.unref();
this._restore_files = value.copy();
foreach (File f in this._restore_files)
f.ref();
foreach (File f in value)
this._restore_files.append(f);
}
}
......
......@@ -74,11 +74,9 @@ public abstract class ToolJob : Object
}
set {
// Deep copy
foreach (File f in this._restore_files)
f.unref();
this._restore_files = value.copy();
foreach (File f in this._restore_files)
f.ref();
this._restore_files = null;
foreach (File f in value)
this._restore_files.append(f);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment