add windows volumes to sysinfo

Signed-off-by: Simon Smith <simonsmith5521@gmail.com>

Simon Smith committed Oct 1, 2023 at 18:43 UTC f057633e1442c448bcd22a89f015c07d19600754
1 file changed +6 -6
agents/meshcore.js
+6 -6
@@ -1814,10 +1814,10 @@ function getSystemInformation(func) {
1814 results.hardware.agentvers = process.versions;
1815 replaceSpacesWithUnderscoresRec(results);
1816 var hasher = require('SHA384Stream').create();
1817 - results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
1818 - func(results);
1817 + // results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
1818 + // func(results);
1819
1820 - /*
1820 +
1821 // On Windows platforms, get volume information - Needs more testing.
1822 if (process.platform == 'win32')
1823 {
@@ -1828,14 +1828,14 @@ function getSystemInformation(func) {
1828 var p = require('identifiers').volumes_promise();
1829 p.then(function (res)
1830 {
1831 - results.volumes = res;
1831 + results.hardware.windows.volumes = res;
1832 results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
1833 func(results);
1834 });
1835 }
1836 else if (require('identifiers').volumes != null)
1837 {
1838 - results.volumes = require('identifiers').volumes();
1838 + results.hardware.windows.volumes = require('identifiers').volumes();
1839 results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
1840 func(results);
1841 }
@@ -1850,7 +1850,7 @@ function getSystemInformation(func) {
1850 results.hash = hasher.syncHash(JSON.stringify(results)).toString('hex');
1851 func(results);
1852 }
1853 - */
1853 +
1854 } catch (ex) { func(null, ex); }
1855 }
1856