Stormfetch will no longer crash if there is an error while reading partition size

This commit is contained in:
CapCreeperGR 2024-06-09 10:20:28 +03:00
parent 720eb845ca
commit b90b869643

View File

@ -345,7 +345,6 @@ func getMountedPartitions() []partition {
}
labels[link] = entry.Name()
}
var partitions []partition
for _, entry := range mounts {
p := partition{
@ -362,7 +361,7 @@ func getMountedPartitions() []partition {
buf := new(syscall.Statfs_t)
err = syscall.Statfs(p.MountPoint, buf)
if err != nil {
log.Fatal(err)
continue
}
totalBlocks := buf.Blocks
freeBlocks := buf.Bfree