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

pull/1561/head
Amr Bashir 9 months ago committed by GitHub
parent 525abc4be5
commit 77149dc432
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"fs-js": "patch"
---
Fix `writeTextFile` converting UTF-8 characters (for example `äöü`) in the given path into replacement character (`<60>`)

File diff suppressed because one or more lines are too long

@ -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