fix(sql): decode opened SQL files with charset fallback
This commit is contained in:
1 parent
3fc6c0eaba
commit
465ed195cf
2 files changed
+16
-3
No files matched your search
@@ -454,10 +454,9 @@ async function openSqlFile() {
|
||||
try {
|
||||
if (isTauriRuntime()) {
|
||||
const { open } = await import("@tauri-apps/plugin-dialog");
|
||||
const { readTextFile } = await import("@tauri-apps/plugin-fs");
|
||||
const path = await open({ filters: [{ name: "SQL", extensions: ["sql"] }], multiple: false });
|
||||
if (path) {
|
||||
const content = await readTextFile(path as string);
|
||||
const content = await api.readExternalSqlFile(path as string);
|
||||
queryStore.updateSql(tab.id, content);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user