mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-01-31 00:45:24 +01:00
fix(fs): writeFile create file by default (#2846)
This commit is contained in:
6
.changes/write-readable-stream-create.md
Normal file
6
.changes/write-readable-stream-create.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
fs: patch
|
||||
fs-js: patch
|
||||
---
|
||||
|
||||
Fix `writeFile` doesn't create a new file by default when the data is a `ReadableStream`
|
||||
File diff suppressed because one or more lines are too long
@@ -1074,7 +1074,7 @@ async function writeFile(
|
||||
}
|
||||
|
||||
if (data instanceof ReadableStream) {
|
||||
const file = await open(path, options)
|
||||
const file = await open(path, { create: true, ...options })
|
||||
const reader = data.getReader()
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user