mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-27 07:35:53 -05:00
Fixed authenticode.js not signing on older NodeJS versions.
This commit is contained in:
parent
8008aa9850
commit
c9cf7a3d88
@ -120,7 +120,7 @@ function createAuthenticodeHandler(path) {
|
|||||||
|
|
||||||
// Open the file descriptor
|
// Open the file descriptor
|
||||||
obj.path = path;
|
obj.path = path;
|
||||||
try { obj.fd = fs.openSync(path); } catch (ex) { return false; } // Unable to open file
|
try { obj.fd = fs.openSync(path, 'r'); } catch (ex) { return false; } // Unable to open file
|
||||||
obj.stats = fs.fstatSync(obj.fd);
|
obj.stats = fs.fstatSync(obj.fd);
|
||||||
obj.filesize = obj.stats.size;
|
obj.filesize = obj.stats.size;
|
||||||
if (obj.filesize < 64) { obj.close(); return false; } // File too short.
|
if (obj.filesize < 64) { obj.close(); return false; } // File too short.
|
||||||
|
Loading…
Reference in New Issue
Block a user