Skip to content

Commit f81f15c

Browse files
committed
fixup! fs: support pseudofiles in promises.readFile
1 parent 2eeb52b commit f81f15c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/internal/fs/promises.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ async function readFileHandle(filehandle, options) {
143143
throw new ERR_FS_FILE_TOO_LARGE(size);
144144

145145
const chunks = [];
146-
const chunkSize = size === 0 ? kReadFileMaxChunkSize :
147-
Math.min(size, kReadFileMaxChunkSize);
146+
const chunkSize = size === 0 ?
147+
kReadFileMaxChunkSize :
148+
Math.min(size, kReadFileMaxChunkSize);
148149
let endOfFile = false;
149150
do {
150151
const buf = Buffer.alloc(chunkSize);

0 commit comments

Comments
 (0)