fix(fs): fix `writeFile` and `writeTextFile` converting UTF-8 characters in path into replacement character

closes #1849
pull/1965/head
amrbashir 9 months ago
parent 525abc4be5
commit 5282d08b2e
No known key found for this signature in database
GPG Key ID: BBD7A47A2003FF33

@ -1072,7 +1072,7 @@ async function writeTextFile(
await invoke('plugin:fs|write_text_file', encoder.encode(data), { await invoke('plugin:fs|write_text_file', encoder.encode(data), {
headers: { headers: {
path: path instanceof URL ? path.toString() : path, path: encodeURIComponent(path instanceof URL ? path.toString() : path),
options: JSON.stringify(options) options: JSON.stringify(options)
} }
}) })

Loading…
Cancel
Save