Closed
Description
Hi,
In #20077 the functions fs.readSync and fs.writeSync have been updated with signatures that did not exist in node v10.19.0 (for instance fs.writeSync with options was only added in node v18.3.0), which breaks running with any earlier version of node.
The four occurrences should really be rewritten as follows for them to work as expected as from node v10.19.0:
return fs.readSync(stream.nfd, new Int8Array(buffer.buffer, offset, length), 0, length, position);
return fs.writeSync(stream.nfd, new Int8Array(buffer.buffer, offset, length), 0, length, position);
var bytesRead = fs.readSync(stream.nfd, new Int8Array(buffer.buffer, offset, length), 0, length, position);
var bytesWritten = fs.writeSync(stream.nfd, new Int8Array(buffer.buffer, offset, length), 0, length, position);
Thanks a lot for the fix!
Kind regards,
Maurice
Metadata
Metadata
Assignees
Labels
No labels