Skip to content

Commit 176573e

Browse files
author
HiroyukiYagihashi
committed
fixup! fixup! fs: add support for async iterators to fs.writeFile
1 parent 6f21783 commit 176573e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/fs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,6 +2091,10 @@ async function writeAllCustomIterable(
20912091
}
20922092
return;
20932093
}
2094+
if (signal?.aborted) {
2095+
handleWriteAllErrorCallback(fd, isUserFd, new AbortError(), callback);
2096+
return;
2097+
}
20942098
const resultValue = isArrayBufferView(result.value) ?
20952099
result.value : Buffer.from(String(result.value), encoding);
20962100
fs.write(fd, resultValue, offset, resultValue.byteLength,

0 commit comments

Comments
 (0)