diff --git a/CHANGELOG.md b/CHANGELOG.md
index 053d9c5..e47541e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
+| 4.26.6 | 2020-06-03 | `diskLayout()` fixed issue linux |
| 4.26.5 | 2020-05-27 | `cpuTemperature()` optimizes scanning AMD linux sensors |
| 4.26.4 | 2020-05-21 | `cpuTemperature()` fix (BSD), code cleanup |
| 4.26.3 | 2020-05-20 | updated documentation (macOS temperature) |
diff --git a/docs/history.html b/docs/history.html
index f4319d6..d9776ca 100644
--- a/docs/history.html
+++ b/docs/history.html
@@ -83,6 +83,11 @@
+
+ | 4.26.6 |
+ 2020-06-03 |
+ diskLayout() fixed issue |
+
| 4.26.5 |
2020-05-27 |
diff --git a/docs/index.html b/docs/index.html
index 7d86243..879b42e 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -168,7 +168,7 @@
systeminformation
- Current Version: 4.26.5
+ Current Version: 4.26.6
@@ -207,7 +207,7 @@
Downloads last month
diff --git a/lib/filesystem.js b/lib/filesystem.js
index cc472b9..eb93227 100755
--- a/lib/filesystem.js
+++ b/lib/filesystem.js
@@ -735,20 +735,21 @@ function diskLayout(callback) {
return new Promise((resolve) => {
process.nextTick(() => {
+ const commitResult = res => {
+ for (let i = 0; i < res.length; i++) {
+ delete res[i].BSDName;
+ }
+ if (callback) {
+ callback(res);
+ }
+ resolve(res);
+ };
+
let result = [];
let cmd = '';
if (_linux) {
let cmdFullSmart = '';
- const commitResult = res => {
- for (let i = 0; i < res.length; i++) {
- delete res[i].BSDName;
- }
- if (callback) {
- callback(res);
- }
- resolve(res);
- };
exec('export LC_ALL=C; lsblk -ablJO 2>/dev/null; unset LC_ALL', function (error, stdout) {
if (!error) {
@@ -854,6 +855,8 @@ function diskLayout(callback) {
}
}
});
+ } else {
+ commitResult(result);
}
});
}