From cc6cc192cb927eab6a7f87de4c5f40ee53e031de Mon Sep 17 00:00:00 2001 From: eleksir Date: Tue, 31 Mar 2026 00:19:02 +0300 Subject: [PATCH] Fix battery detection. --- internal/lib/batteries.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/lib/batteries.go b/internal/lib/batteries.go index d3e5e3b..1fc8f7b 100644 --- a/internal/lib/batteries.go +++ b/internal/lib/batteries.go @@ -60,7 +60,8 @@ func (c *MyConfig) UpdateBatteryInfo() { statusFile := filepath.Dir(file) + "/status" - // If file exists. + _, err = os.Stat(statusFile) + if !os.IsNotExist(err) { b, err := os.ReadFile(statusFile)