fsSize() fix mount points issue - wip
This commit is contained in:
parent
af4504fddc
commit
85f61fa2cf
@ -43,7 +43,7 @@ function parseWinBatteryPart(lines, designedCapacity, fullChargeCapacity) {
|
|||||||
// 10 = "Undefined"
|
// 10 = "Undefined"
|
||||||
// 11 = "Partially Charged"
|
// 11 = "Partially Charged"
|
||||||
if (status >= 0) {
|
if (status >= 0) {
|
||||||
const statusValue = status ? parseInt(status) : 0;
|
const statusValue = status;
|
||||||
result.status = statusValue;
|
result.status = statusValue;
|
||||||
result.hasBattery = true;
|
result.hasBattery = true;
|
||||||
result.maxCapacity = fullChargeCapacity || parseInt(util.getValue(lines, 'DesignCapacity', ':') || 0);
|
result.maxCapacity = fullChargeCapacity || parseInt(util.getValue(lines, 'DesignCapacity', ':') || 0);
|
||||||
|
|||||||
@ -101,7 +101,7 @@ function fsSize(drive, callback) {
|
|||||||
const rw = osMounts && Object.keys(osMounts).length > 0 ? osMounts[fs] || false : null;
|
const rw = osMounts && Object.keys(osMounts).length > 0 ? osMounts[fs] || false : null;
|
||||||
line.splice(0, _linux || _freebsd || _openbsd || _netbsd ? 6 : 5);
|
line.splice(0, _linux || _freebsd || _openbsd || _netbsd ? 6 : 5);
|
||||||
const mount = line.join(' ');
|
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({
|
data.push({
|
||||||
fs,
|
fs,
|
||||||
type: fsType,
|
type: fsType,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user