Commit 8d15219c authored by Michael Terry's avatar Michael Terry

AssistantRestore: Fix crash with --restore-missing

https://bugs.launchpad.net/deja-dup/+bug/1729935
parent 73c1a259
......@@ -80,7 +80,13 @@ public class AssistantRestore : AssistantOperation
add_date_page();
add_restore_dest_page();
}
void ensure_config_location()
{
label_sizes = new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL);
config_location = new DejaDup.ConfigLocation(true, true, label_sizes);
}
Gtk.Widget make_backup_location_page()
{
int rows = 0;
......@@ -91,6 +97,7 @@ public class AssistantRestore : AssistantOperation
"column-spacing", 12,
"border-width", 12);
ensure_config_location();
label = new Gtk.Label.with_mnemonic(_("_Backup location"));
label.set("xalign", 1.0f,
"mnemonic-widget", config_location);
......@@ -120,10 +127,6 @@ public class AssistantRestore : AssistantOperation
protected override void add_custom_config_pages()
{
// Must always make ConfigLocation, so we can grab the backend from it
label_sizes = new Gtk.SizeGroup(Gtk.SizeGroupMode.HORIZONTAL);
config_location = new DejaDup.ConfigLocation(true, true, label_sizes);
// always show for a full restore or if user hasn't ever used us
if (restore_files == null || !DejaDup.has_seen_settings()) {
var page = make_backup_location_page();
......@@ -298,6 +301,7 @@ public class AssistantRestore : AssistantOperation
realize();
ensure_config_location();
var rest_op = new DejaDup.OperationRestore(config_location.get_backend(),
restore_location, date, restore_files);
if (this.op_state != null)
......@@ -390,6 +394,7 @@ public class AssistantRestore : AssistantOperation
{
realize();
ensure_config_location();
query_op = new DejaDup.OperationStatus(config_location.get_backend());
op = query_op;
......
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