fix(sqlite): prevent file launch from overwriting existing connections
This commit is contained in:
1 parent
51fe5de98b
commit
b4e8190b52
1 file changed
+2
@@ -493,6 +493,7 @@ function getDbTypeFromPath(path: string): "sqlite" | "duckdb" | null {
|
||||
|
||||
async function openDbFilePath(path: string) {
|
||||
if (!isTauriRuntime()) return;
|
||||
await connectionStore.initFromDisk();
|
||||
try {
|
||||
const name = path.split("/").pop()?.split("\\").pop() || path;
|
||||
const dbType = getDbTypeFromPath(path);
|
||||
@@ -550,6 +551,7 @@ async function openPendingDbFiles() {
|
||||
}
|
||||
|
||||
async function openConnectionDeepLink(url: string) {
|
||||
await connectionStore.initFromDisk();
|
||||
try {
|
||||
const draft = parseConnectionDeepLink(url);
|
||||
if (!draft) return;
|
||||
|
||||
Reference in new issue
Block a user