filter snap

This commit is contained in:
Robin Appelman 2021-03-24 23:33:22 +01:00
commit 379c3fbc3a

View file

@ -133,6 +133,7 @@ impl Heim {
let name = partition.mount_point().to_string_lossy().to_string(); let name = partition.mount_point().to_string_lossy().to_string();
partition.usage().await.ok().map(|usage| (name, usage)) partition.usage().await.ok().map(|usage| (name, usage))
}) })
.filter(|(mount_point, _usage)| future::ready(!mount_point.contains("/snap/")))
.map(|(mount_point, usage)| DiskUsage { .map(|(mount_point, usage)| DiskUsage {
name: mount_point, name: mount_point,
size: usage.total().get::<information::byte>(), size: usage.total().get::<information::byte>(),