From 5e4dfbc963b1af2b70475bca454b077c365e2abc Mon Sep 17 00:00:00 2001 From: KernelDeimos <7225168+KernelDeimos@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:55:41 -0500 Subject: [PATCH] fix: attempt coercion to fix vscode corruption --- src/gui/src/IPC.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/src/IPC.js b/src/gui/src/IPC.js index 545c17486..6e08d3b35 100644 --- a/src/gui/src/IPC.js +++ b/src/gui/src/IPC.js @@ -1765,7 +1765,15 @@ const ipc_listener = async (event, handled) => { // File // ------------------------------------- else { - let file_to_upload = new File([event.data.content], path.basename(target_path)); + let content = event.data.content; + let file_to_upload; + + if ( typeof content === 'string' ) { + const blob = new Blob([content], { type: 'text/plain' }); + file_to_upload = new File([blob], path.basename(target_path), { type: 'text/plain' }); + } else { + file_to_upload = new File([content], path.basename(target_path)); + } while ( item_with_same_name_already_exists ) { if ( overwrite )