Skip to content

Commit fdcc2da

Browse files
anonrigH4ad
authored andcommitted
fixup! fs: add a fast-path for readFileSync utf-8
Backport-PR-URL: nodejs#48658
1 parent a87fa4a commit fdcc2da

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

lib/fs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const {
139139
validateInteger,
140140
validateObject,
141141
} = require('internal/validators');
142-
const { readFileSyncUtf8 } = require('internal/fs/read-file/utf8');
142+
const { readFileSyncUtf8 } = require('internal/fs/read/utf8');
143143

144144
let truncateWarn = true;
145145
let fs;
@@ -384,7 +384,7 @@ function checkAborted(signal, callback) {
384384
function readFile(path, options, callback) {
385385
callback = maybeCallback(callback || options);
386386
options = getOptions(options, { flag: 'r' });
387-
const ReadFileContext = require('internal/fs/read-file/context');
387+
const ReadFileContext = require('internal/fs/read/context');
388388
const context = new ReadFileContext(callback, options.encoding);
389389
context.isUserFd = isFd(path); // File descriptor ownership
390390

File renamed without changes.

0 commit comments

Comments
 (0)