@@ -47,9 +47,11 @@ public class AlongsideView: OptionsView {
47
47
public void update_options () {
48
48
base . clear_options ();
49
49
50
+ var options = InstallOptions . get_default ();
51
+
50
52
add_alongside_options ();
51
53
52
- if (InstallOptions . get_default () . get_options (). has_erase_options ()) {
54
+ if (options . get_options (). has_erase_options ()) {
53
55
add_erase_options ();
54
56
}
55
57
@@ -59,16 +61,23 @@ public class AlongsideView: OptionsView {
59
61
60
62
private void add_alongside_options () {
61
63
var install_options = InstallOptions . get_default ();
64
+ unowned string ? install_device = install_options. get_install_device_path ();
62
65
63
66
foreach (var option in install_options. get_options (). get_alongside_options ()) {
67
+ var device = Utils . string_from_utf8 (option. get_device ());
68
+
69
+ if (install_device != null && install_device == device) {
70
+ debug (" skipping %s because it is on the install device\n " , device);
71
+ continue ;
72
+ }
73
+
64
74
string ? os = Utils . string_from_utf8 (option. get_os ());
65
75
os = os == " none" ? null : os;
66
76
67
- var device = Utils . string_from_utf8 (option. get_device ());
68
77
var free = option. get_sectors_free ();
69
78
var total = option. get_sectors_total ();
70
79
var partition = option. get_partition ();
71
- var path = Utils . string_from_utf8 (option. get_path ());
80
+ var partition_path = Utils . string_from_utf8 (option. get_path ());
72
81
string logo = Utils . get_distribution_logo_from_alongside (option);
73
82
74
83
string label;
@@ -80,7 +89,7 @@ public class AlongsideView: OptionsView {
80
89
label = _(" %s on %s " ). printf (os == null ? _(" Partition" ) : os, device);
81
90
details = _(" Shrink %s (%.1f GiB free)" )
82
91
.printf (
83
- path ,
92
+ partition_path ,
84
93
(double ) free / SECTORS_AS_GIB
85
94
);
86
95
}
@@ -129,8 +138,15 @@ public class AlongsideView: OptionsView {
129
138
private void add_erase_options () {
130
139
var install_options = InstallOptions . get_default ();
131
140
unowned Distinst . InstallOptions options = install_options. get_updated_options ();
141
+ unowned string ? install_device = install_options. get_install_device_path ();
132
142
133
143
foreach (unowned Distinst . EraseOption disk in options. get_erase_options ()) {
144
+ string device_path = Utils . string_from_utf8 (disk. get_device_path ());
145
+
146
+ if (install_device != null && install_device == device_path && ! install_options. has_recovery ()) {
147
+ continue ;
148
+ }
149
+
134
150
string logo = Utils . string_from_utf8 (disk. get_linux_icon ());
135
151
string label = Utils . string_from_utf8 (disk. get_model ());
136
152
string details = " Erase %s %.1f GiB" . printf (
0 commit comments