Skip to content

Commit d3c4030

Browse files
committed
fixup! fs: add a fast-path for readFileSync utf-8
Backport-PR-URL: nodejs#48658
1 parent c655d38 commit d3c4030

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
@@ -145,7 +145,7 @@ const {
145145
validateObject,
146146
validateString,
147147
} = require('internal/validators');
148-
const { readFileSyncUtf8 } = require('internal/fs/read-file/utf8');
148+
const { readFileSyncUtf8 } = require('internal/fs/read/utf8');
149149

150150
const watchers = require('internal/fs/watchers');
151151

@@ -391,7 +391,7 @@ function checkAborted(signal, callback) {
391391
function readFile(path, options, callback) {
392392
callback = maybeCallback(callback || options);
393393
options = getOptions(options, { flag: 'r' });
394-
const ReadFileContext = require('internal/fs/read-file/context');
394+
const ReadFileContext = require('internal/fs/read/context');
395395
const context = new ReadFileContext(callback, options.encoding);
396396
context.isUserFd = isFd(path); // File descriptor ownership
397397

File renamed without changes.

0 commit comments

Comments
 (0)