mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added workaround for 32 bit windows agent on 64 bit windows, to inject sysnative when callind readdirSync() on %windir%
Updated documentation for windows terminal.
This commit is contained in:
parent
601d5e5fcb
commit
06ec0caec4
3 changed files with 262 additions and 74 deletions
|
@ -47,6 +47,27 @@ var MESHRIGHT_NODESKTOP = 65536;
|
|||
|
||||
var pendingSetClip = false; // This is a temporary hack to prevent multiple setclips at the same time to stop the agent from crashing.
|
||||
|
||||
function __readdirSync_fix(path)
|
||||
{
|
||||
var sysnative = false;
|
||||
pathstr = require('fs')._fixwinpath(path);
|
||||
if (pathstr.split('\\*').join('').toLowerCase() == process.env['windir'].toLowerCase()) { sysnative = true; }
|
||||
var ret = __readdirSync_old(path);
|
||||
if (sysnative) { ret.push('sysnative'); }
|
||||
return (ret);
|
||||
}
|
||||
|
||||
if (process.platform == 'win32' && require('_GenericMarshal').PointerSize == 4 && require('os').arch() == 'x64')
|
||||
{
|
||||
if(require('fs').readdirSync.version == null)
|
||||
{
|
||||
require('fs').__readdirSync_old = require('fs').readdirSync;
|
||||
require('fs').readdirSync = __readdirSync_fix;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function bcdOK() {
|
||||
if (process.platform != 'win32') { return (false); }
|
||||
if (require('os').arch() == 'x64') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue