Skip to content

Commit

Permalink
fix: disk listed twice on macos (fluxxcode#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
hacknus authored Nov 21, 2024
1 parent 27fda88 commit fd8649e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/data/disks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,10 @@ fn load_disks(canonicalize_paths: bool) -> Vec<Disk> {
// 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));
}
}
Expand Down

0 comments on commit fd8649e

Please sign in to comment.