try to fix swap issue

This commit is contained in:
Ward from fusion-voyager-3 2024-08-24 02:50:20 +03:00
parent fe699ae2b4
commit f05321f3b6
2 changed files with 16 additions and 4 deletions

View File

@ -844,6 +844,10 @@ pub fn create_mount_row(
never: Rc::new(RefCell::new(false)), never: Rc::new(RefCell::new(false)),
} }
}; };
if partition.part_fs == "linux-swap" || partition.part_fs == "linux-swap" {
(*partition_row_struct.swap_fs_error.borrow_mut()) = true;
partition_row_struct.widget.set_sensitive(false);
}
post_check_drive_mount( post_check_drive_mount(
&row, &row,
&partition_row_struct, &partition_row_struct,
@ -1015,8 +1019,14 @@ fn post_check_drive_mount(
&& *partition_row_struct.never.borrow() == false && *partition_row_struct.never.borrow() == false
&& *partition_row_struct.hardcode_fs_error.borrow() == false && *partition_row_struct.hardcode_fs_error.borrow() == false
{ {
(*partition_row_struct.swap_fs_error.borrow_mut()) = false; if *partition_row_struct.swap_fs_error.borrow() == false {
partition_row_struct.widget.set_sensitive(true); partition_row_struct.widget.set_sensitive(true);
} else {
null_checkbutton.set_active(true);
row.set_partition("");
partition_changed_action.activate(None);
partition_row_struct.widget.set_sensitive(false);
};
} }
} }
} }

View File

@ -274,9 +274,11 @@ pub fn manual_partitioning_page(
(errored.store(true, std::sync::atomic::Ordering::Relaxed)); (errored.store(true, std::sync::atomic::Ordering::Relaxed));
} }
} }
if fs_entry.mountpoint == "[SWAP]" && fs_entry.partition.part_fs != "linux-swap" { if fs_entry.mountpoint == "[SWAP]" {
if fs_entry.partition.part_fs != "linux-swap" || fs_entry.partition.part_fs != "swap" {
(errored.store(true, std::sync::atomic::Ordering::Relaxed)); (errored.store(true, std::sync::atomic::Ordering::Relaxed));
} }
}
if fs_entry.mountpoint.is_empty() { if fs_entry.mountpoint.is_empty() {
(errored.store(true, std::sync::atomic::Ordering::Relaxed)); (errored.store(true, std::sync::atomic::Ordering::Relaxed));
partition_method_manual_mountpoint_empty_error_label.set_visible(true); partition_method_manual_mountpoint_empty_error_label.set_visible(true);