From fd8649e83e552b502877fa3b8ee63acd26dc4e42 Mon Sep 17 00:00:00 2001 From: hacknus <33124824+hacknus@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:51:31 +0100 Subject: [PATCH] fix: disk listed twice on macos (#204) --- src/data/disks.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/data/disks.rs b/src/data/disks.rs index cacc85cb..7b3d0f29 100644 --- a/src/data/disks.rs +++ b/src/data/disks.rs @@ -182,7 +182,10 @@ fn load_disks(canonicalize_paths: bool) -> Vec { // Collect disks from sysinfo for disk in &sysinfo::Disks::new_with_refreshed_list() { let mount_point = disk.mount_point(); - if mount_point != Path::new("/") && seen_mount_points.insert(mount_point.to_path_buf()) { + if mount_point != Path::new("/") + && seen_mount_points.insert(mount_point.to_path_buf()) + && disk.mount_point() != Path::new("/System/Volumes/Data") + { result.push(Disk::from_sysinfo_disk(disk, canonicalize_paths)); } }