bugfix diskLayout() (Windows)
This commit is contained in:
parent
f7e9d9389d
commit
57710ed96d
@ -99,6 +99,7 @@ Other changes
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 3.33.14 | 2018-01-17 | bugfix `diskLayout()` (Windows) |
|
||||
| 3.33.13 | 2018-01-12 | bugfix `memLayout()` (Windows) |
|
||||
| 3.33.12 | 2017-12-25 | fixed typos |
|
||||
| 3.33.11 | 2017-12-17 | updated docs |
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017 Sebastian Hildebrandt
|
||||
Copyright (c) 2014-2018 Sebastian Hildebrandt
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
@ -576,7 +576,7 @@ All other trademarks are the property of their respective owners.
|
||||
|
||||
>The [`MIT`][license-url] License (MIT)
|
||||
>
|
||||
>Copyright © 2014-2017 Sebastian Hildebrandt, [+innovations](http://www.plus-innovations.com).
|
||||
>Copyright © 2014-2018 Sebastian Hildebrandt, [+innovations](http://www.plus-innovations.com).
|
||||
>
|
||||
>Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
>of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
@ -237,7 +237,7 @@ function blockDevices(callback) {
|
||||
});
|
||||
}
|
||||
if (_windows) {
|
||||
let drivetypes = ['Unknown', 'NoRoot', 'Removable', 'HDD', 'Network', 'CD/DVD', 'RAM']
|
||||
let drivetypes = ['Unknown', 'NoRoot', 'Removable', 'HDD', 'Network', 'CD/DVD', 'RAM'];
|
||||
exec(util.getWmic() + ' logicaldisk get Caption,Description,DeviceID,DriveType,FileSystem,FreeSpace,Name,Size,VolumeName,VolumeSerialNumber /value', function (error, stdout) {
|
||||
if (!error) {
|
||||
let devices = stdout.toString().split(/\n\s*\n/);
|
||||
@ -543,7 +543,7 @@ function disksIO(callback) {
|
||||
callback(result);
|
||||
}
|
||||
resolve(result);
|
||||
})
|
||||
});
|
||||
}
|
||||
} else {
|
||||
result.rIO = _disk_io.rIO;
|
||||
@ -671,7 +671,7 @@ function diskLayout(callback) {
|
||||
sizeValue = parseInt(sizeStr);
|
||||
}
|
||||
if (sizeValue) {
|
||||
result.push({
|
||||
result.push({
|
||||
type: 'NVMe',
|
||||
name: util.getValue(lines, 'Model', ':', true).trim(),
|
||||
vendor: '',
|
||||
@ -700,9 +700,9 @@ function diskLayout(callback) {
|
||||
}
|
||||
if (_windows) {
|
||||
|
||||
exec(util.getWmic() + ' diskdrive get /value', function (error, stdout) {
|
||||
exec(util.getWmic() + ' diskdrive get /value', {encoding: 'utf8'}, function (error, stdout) {
|
||||
if (!error) {
|
||||
let devices = stdout.toString().split('\r\n\r\n\r\n');
|
||||
let devices = stdout.toString().split(/\n\s*\n/);
|
||||
devices.forEach(function (device) {
|
||||
let lines = device.split('\r\n');
|
||||
const size = util.getValue(lines, 'Size', '=').trim();
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Contributors: Guillaume Legrain (https://github.com/glegrain)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Description: System Information - library
|
||||
// for Node.js
|
||||
// Copyright: (c) 2014 - 2017
|
||||
// Copyright: (c) 2014 - 2018
|
||||
// Author: Sebastian Hildebrandt
|
||||
// ----------------------------------------------------------------------------------
|
||||
// License: MIT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user