Skip to content

Commit

Permalink
fix(ext/fs): truncate files when a ReadableStream is passed to writeFile
Browse files Browse the repository at this point in the history
  • Loading branch information
char committed Apr 11, 2024
1 parent f358ae6 commit a933251
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/fs/30_fs.js
Expand Up @@ -926,6 +926,7 @@ async function writeFile(
append: options.append ?? false,
create: options.create ?? true,
createNew: options.createNew ?? false,
truncate: true,
write: true,
});
await data.pipeTo(file.writable, {
Expand Down

0 comments on commit a933251

Please sign in to comment.