We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05d468a commit fccbb41Copy full SHA for fccbb41
lib/fs.js
@@ -473,7 +473,8 @@ function readFileSync(path, options) {
473
474
// TODO(@anonrig): Do not handle file descriptor ownership for now.
475
if (!isUserFd && (options.encoding === 'utf8' || options.encoding === 'utf-8')) {
476
- return readFileSyncUtf8(getValidatedPath(path), stringToFlags(options.flag));
+ path = getValidatedPath(path);
477
+ return readFileSyncUtf8(pathModule.toNamespacedPath(path), stringToFlags(options.flag));
478
}
479
480
const fd = isUserFd ? path : fs.openSync(path, options.flag, 0o666);
0 commit comments