From 486ed4ac85418f95456ff84888617f04526769ab Mon Sep 17 00:00:00 2001 From: Peter Voronov Date: Mon, 8 Apr 2024 17:18:50 +0300 Subject: [PATCH] Make `node:fs` `constants` available thru the `protectFS` --- lib/protectFs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/protectFs.js b/lib/protectFs.js index a29abf03..934b68e0 100644 --- a/lib/protectFs.js +++ b/lib/protectFs.js @@ -377,6 +377,9 @@ const ProtectFs = function (log, ioBrokerDataDir) { } }; + // Add missing constants + this.constants = nodeFS.constants; + // Add missing functions for (const m in nodeFS) { if (typeof nodeFS[m] === 'function' && Object.hasOwn(nodeFS, m) && !Object.hasOwn(this, m)) {