From c4839b6d130f4ab150f89375353319cbf9fb7248 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Wed, 10 Jun 2026 16:49:47 +0800 Subject: [PATCH] fix(sql-library): use string compare instead of extname for import folder --- apps/desktop/src/components/layout/SqlLibraryPanel.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/components/layout/SqlLibraryPanel.vue b/apps/desktop/src/components/layout/SqlLibraryPanel.vue index 547fa6c36..74aaf2d56 100644 --- a/apps/desktop/src/components/layout/SqlLibraryPanel.vue +++ b/apps/desktop/src/components/layout/SqlLibraryPanel.vue @@ -181,7 +181,7 @@ async function exportFolderContents(folder?: SavedSqlFolder) { async function collectSqlFilesRecursively(dir: string): Promise { const { readDir } = await import("@tauri-apps/plugin-fs"); - const { join, extname } = await import("@tauri-apps/api/path"); + const { join } = await import("@tauri-apps/api/path"); const results: string[] = []; for (const entry of await readDir(dir)) { @@ -191,7 +191,7 @@ async function collectSqlFilesRecursively(dir: string): Promise { continue; } if (!entry.isFile) continue; - if ((await extname(fullPath)).toLowerCase() !== ".sql") continue; + if (!fullPath.toLowerCase().endsWith(".sql")) continue; results.push(fullPath); } return results;