diskLayout() fixed issue linux

This commit is contained in:
Sebastian Hildebrandt 2020-06-03 20:03:32 +02:00
parent 1a9f9a5af9
commit 4c297cde70
4 changed files with 20 additions and 11 deletions

View File

@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment | | 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.5 | 2020-05-27 | `cpuTemperature()` optimizes scanning AMD linux sensors |
| 4.26.4 | 2020-05-21 | `cpuTemperature()` fix (BSD), code cleanup | | 4.26.4 | 2020-05-21 | `cpuTemperature()` fix (BSD), code cleanup |
| 4.26.3 | 2020-05-20 | updated documentation (macOS temperature) | | 4.26.3 | 2020-05-20 | updated documentation (macOS temperature) |

View File

@ -83,6 +83,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">4.26.6</th>
<td>2020-06-03</td>
<td><span class="code">diskLayout()</span> fixed issue</td>
</tr>
<tr> <tr>
<th scope="row">4.26.5</th> <th scope="row">4.26.5</th>
<td>2020-05-27</td> <td>2020-05-27</td>

View File

@ -168,7 +168,7 @@
<img class="logo" src="assets/logo.png"> <img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div> <div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.26.5</span></div> <div class="version">Current Version: <span id="version">4.26.6</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button> <button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div> </div>
<div class="down"> <div class="down">
@ -207,7 +207,7 @@
<div class="title">Downloads last month</div> <div class="title">Downloads last month</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">275</div> <div class="numbers">280</div>
<div class="title">Dependends</div> <div class="title">Dependends</div>
</div> </div>
</div> </div>

View File

@ -735,20 +735,21 @@ function diskLayout(callback) {
return new Promise((resolve) => { return new Promise((resolve) => {
process.nextTick(() => { 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 result = [];
let cmd = ''; let cmd = '';
if (_linux) { if (_linux) {
let cmdFullSmart = ''; 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) { exec('export LC_ALL=C; lsblk -ablJO 2>/dev/null; unset LC_ALL', function (error, stdout) {
if (!error) { if (!error) {
@ -854,6 +855,8 @@ function diskLayout(callback) {
} }
} }
}); });
} else {
commitResult(result);
} }
}); });
} }