@setoelkahfi / svara / commits / 23a7378

chore: removed unused code

mellbacon committed Aug 20, 2023 at 17:11 UTC 23a7378aa53ed42efc72abd3e5469049ef72ebc4
1 file changed -3
src/lib/File.ts
-3
@@ -157,9 +157,6 @@ export async function saveFile(saveAs = false) {
157 tab.label = newPath.split(path.sep).pop();
158 }
159 // write changes to the file
160 - // TODO: need to find a way to save files in different encodings. it saves as utf 8 by default (very annoying)
161 - //fs.writeFile(tab.path, tab.content.getFileContent());
162 - //const bytes = new TextEncoder().encode(tab.content.getFileContent())
160 await invoke("write_file", {path: tab.path, content: tab.content.getFileContent(), enc: tab.content.getEncoding(), hasBom: tab.content.hasBom()})
161 const fileType = await path.extname(tab.path);
162 tab.content.updateFileInfo({