From 85f61fa2cf3be3189b52804e728f03f44f571170 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 1 Jan 2026 16:47:40 +0100 Subject: [PATCH] fsSize() fix mount points issue - wip --- lib/battery.js | 2 +- lib/filesystem.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/battery.js b/lib/battery.js index 17e0127..990db85 100644 --- a/lib/battery.js +++ b/lib/battery.js @@ -43,7 +43,7 @@ function parseWinBatteryPart(lines, designedCapacity, fullChargeCapacity) { // 10 = "Undefined" // 11 = "Partially Charged" if (status >= 0) { - const statusValue = status ? parseInt(status) : 0; + const statusValue = status; result.status = statusValue; result.hasBattery = true; result.maxCapacity = fullChargeCapacity || parseInt(util.getValue(lines, 'DesignCapacity', ':') || 0); diff --git a/lib/filesystem.js b/lib/filesystem.js index b0466b4..edf0255 100644 --- a/lib/filesystem.js +++ b/lib/filesystem.js @@ -101,7 +101,7 @@ function fsSize(drive, callback) { const rw = osMounts && Object.keys(osMounts).length > 0 ? osMounts[fs] || false : null; line.splice(0, _linux || _freebsd || _openbsd || _netbsd ? 6 : 5); const mount = line.join(' '); - if (!data.find((el) => el.fs === fs && el.type === fsType)) { + if (!data.find((el) => el.fs === fs && el.type === fsType && el.mount === mount)) { data.push({ fs, type: fsType,