From d8de20420dad931e932df1f6a7714b1af8677010 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 21 Jan 2022 12:11:59 +0100 Subject: [PATCH] usb() fix, users() fix tty (sindows) --- CHANGELOG.md | 1 + docs/history.html | 5 +++++ docs/index.html | 2 +- lib/usb.js | 2 +- lib/users.js | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 071c696..a43c7e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.10.6 | 2022-01-21 | `usb()` fix `users()` fix tty (windows) | | 5.10.5 | 2022-01-19 | `processes()` fix calculation (windows) | | 5.10.4 | 2022-01-18 | `battery()` fix detection (windows) | | 5.10.3 | 2022-01-17 | `system()` improved virtual detection (windows) | diff --git a/docs/history.html b/docs/history.html index dcda34f..3b319af 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.10.6 + 2022-01-21 + usb() fix, users() fix tty (windows) + 5.10.5 2022-01-19 diff --git a/docs/index.html b/docs/index.html index 6f71e12..f1ebeae 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.10.5
+
New Version: 5.10.6
diff --git a/lib/usb.js b/lib/usb.js index 9640b16..2170490 100644 --- a/lib/usb.js +++ b/lib/usb.js @@ -263,7 +263,7 @@ function usb(callback) { }); } if (_windows) { - util.powerShell('Get-WmiObject CIM_LogicalDevice | where { $_.Description -match "^USB"}').then((stdout, error) => { + util.powerShell('Get-WmiObject CIM_LogicalDevice | where { $_.Description -match "USB"}').then((stdout, error) => { if (!error) { const parts = stdout.toString().split(/\n\s*\n/); for (let i = 0; i < parts.length; i++) { diff --git a/lib/users.js b/lib/users.js index f0e519c..07a8424 100644 --- a/lib/users.js +++ b/lib/users.js @@ -349,7 +349,7 @@ function fuzzyMatch(name1, name2) { name2 = name2.toLowerCase(); let eq = 0; let len = name1.length; - if (name2.length > len) { len = name1.length; } + if (name2.length > len) { len = name2.length; } for (let i = 0; i < len; i++) { const c1 = name1[i] || '';