From 408d8bcc00bb429a55f61072f5f86abdbec7cf47 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Sat, 24 Aug 2024 03:02:28 +0300 Subject: [PATCH] try to fix swap issue again --- src/manual_partitioning_page/func.rs | 4 ++-- src/manual_partitioning_page/mod.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/manual_partitioning_page/func.rs b/src/manual_partitioning_page/func.rs index 5ad7ac6..d2b1ae0 100644 --- a/src/manual_partitioning_page/func.rs +++ b/src/manual_partitioning_page/func.rs @@ -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; diff --git a/src/manual_partitioning_page/mod.rs b/src/manual_partitioning_page/mod.rs index fe79102..e8ca514 100644 --- a/src/manual_partitioning_page/mod.rs +++ b/src/manual_partitioning_page/mod.rs @@ -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)); } }