Skip to content

Commit 77149dc

Browse files
authored
fix(fs): fix writeFile converting UTF-8 characters in path into replacement character (#1965)
1 parent 525abc4 commit 77149dc

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"fs-js": "patch"
3+
---
4+
5+
Fix `writeTextFile` converting UTF-8 characters (for example `äöü`) in the given path into replacement character (``)

plugins/fs/api-iife.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/fs/guest-js/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ async function writeTextFile(
10721072

10731073
await invoke('plugin:fs|write_text_file', encoder.encode(data), {
10741074
headers: {
1075-
path: path instanceof URL ? path.toString() : path,
1075+
path: encodeURIComponent(path instanceof URL ? path.toString() : path),
10761076
options: JSON.stringify(options)
10771077
}
10781078
})

0 commit comments

Comments
 (0)