@tauri-apps/plugin-fs 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-js/index.cjs +1 -1
- package/dist-js/index.js +1 -1
- package/package.json +1 -1
package/dist-js/index.cjs
CHANGED
|
@@ -641,7 +641,7 @@ async function writeFile(path, data, options) {
|
|
|
641
641
|
throw new TypeError('Must be a file URL.');
|
|
642
642
|
}
|
|
643
643
|
if (data instanceof ReadableStream) {
|
|
644
|
-
const file = await open(path, options);
|
|
644
|
+
const file = await open(path, { create: true, ...options });
|
|
645
645
|
const reader = data.getReader();
|
|
646
646
|
try {
|
|
647
647
|
while (true) {
|
package/dist-js/index.js
CHANGED
|
@@ -639,7 +639,7 @@ async function writeFile(path, data, options) {
|
|
|
639
639
|
throw new TypeError('Must be a file URL.');
|
|
640
640
|
}
|
|
641
641
|
if (data instanceof ReadableStream) {
|
|
642
|
-
const file = await open(path, options);
|
|
642
|
+
const file = await open(path, { create: true, ...options });
|
|
643
643
|
const reader = data.getReader();
|
|
644
644
|
try {
|
|
645
645
|
while (true) {
|