From b90b869643c0ccb25d6ef0f143f578c146d858e6 Mon Sep 17 00:00:00 2001 From: CapCreeperGR Date: Sun, 9 Jun 2024 10:20:28 +0300 Subject: [PATCH] Stormfetch will no longer crash if there is an error while reading partition size --- utils.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils.go b/utils.go index 42e6d5d..5fb4746 100644 --- a/utils.go +++ b/utils.go @@ -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