fix(sql-library): use string compare instead of extname for import folder
This commit is contained in:
parent
ca1d420d91
commit
c4839b6d13
|
|
@ -181,7 +181,7 @@ async function exportFolderContents(folder?: SavedSqlFolder) {
|
|||
|
||||
async function collectSqlFilesRecursively(dir: string): Promise<string[]> {
|
||||
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<string[]> {
|
|||
continue;
|
||||
}
|
||||
if (!entry.isFile) continue;
|
||||
if ((await extname(fullPath)).toLowerCase() !== ".sql") continue;
|
||||
if (!fullPath.toLowerCase().endsWith(".sql")) continue;
|
||||
results.push(fullPath);
|
||||
}
|
||||
return results;
|
||||
|
|
|
|||
Loading…
Reference in New Issue