Skip to content

Commit

Permalink
Make node:fs constants available thru the protectFS
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterVoronov committed Apr 8, 2024
1 parent 02ba8d0 commit 486ed4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/protectFs.js
Expand Up @@ -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)) {
Expand Down

0 comments on commit 486ed4a

Please sign in to comment.