diff --git a/plugins/fs/guest-js/index.ts b/plugins/fs/guest-js/index.ts index 57e7518d..ed8749d7 100644 --- a/plugins/fs/guest-js/index.ts +++ b/plugins/fs/guest-js/index.ts @@ -1072,7 +1072,7 @@ async function writeTextFile( await invoke('plugin:fs|write_text_file', encoder.encode(data), { headers: { - path: path instanceof URL ? path.toString() : path, + path: encodeURIComponent(path instanceof URL ? path.toString() : path), options: JSON.stringify(options) } })