(sessionId: string)
| 548 | } |
| 549 | |
| 550 | function deleteImportedSessionFiles(sessionId: string): void { |
| 551 | const dbPath = path.join(getDbDir(), `${sessionId}.db`) |
| 552 | for (const suffix of ['', '-wal', '-shm']) { |
| 553 | try { |
| 554 | const p = dbPath + suffix |
| 555 | if (fs.existsSync(p)) fs.unlinkSync(p) |
| 556 | } catch { |
| 557 | /* ignore */ |
| 558 | } |
| 559 | } |
| 560 | } |
| 561 | |
| 562 | /** |
| 563 | * 获取数据库目录(供外部使用) |
no test coverage detected