try to fix swap issue again

This commit is contained in:
Ward from fusion-voyager-3 2024-08-24 03:02:28 +03:00
parent cd97c30bef
commit 408d8bcc00
2 changed files with 4 additions and 3 deletions

View File

@ -844,7 +844,7 @@ pub fn create_mount_row(
never: Rc::new(RefCell::new(false)),
}
};
if partition.part_fs == "linux-swap" || partition.part_fs == "linux-swap" {
if partition.part_fs == "linux-swap" || partition.part_fs == "swap" {
(*partition_row_struct.swap_fs_error.borrow_mut()) = true;
partition_row_struct.widget.set_sensitive(false);
}
@ -1019,7 +1019,7 @@ fn post_check_drive_mount(
&& *partition_row_struct.never.borrow() == false
&& *partition_row_struct.hardcode_fs_error.borrow() == false
{
if partition.part_fs != "linux-swap" || partition.part_fs != "swap" {
if partition.part_fs != "linux-swap" && partition.part_fs != "swap" {
partition_row_struct.widget.set_sensitive(true);
} else {
(*partition_row_struct.swap_fs_error.borrow_mut()) = true;

View File

@ -275,7 +275,8 @@ pub fn manual_partitioning_page(
}
}
if fs_entry.mountpoint == "[SWAP]" {
if fs_entry.partition.part_fs != "linux-swap" || fs_entry.partition.part_fs != "swap" {
if fs_entry.partition.part_fs == "linux-swap" || fs_entry.partition.part_fs == "swap" {
} else {
(errored.store(true, std::sync::atomic::Ordering::Relaxed));
}
}