mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-12 18:14:36 +00:00
Fix OpenCode/Goose returning 0 sessions on fresh install
SQLite-based providers use compound paths (db.path:sessionId) which caused fingerprintFile to fail stat() and silently skip all sessions. Fall back to stat on the DB file when the full compound path fails. Fixes #346
This commit is contained in:
parent
b835b69cf4
commit
d072bf1cb6
1 changed files with 9 additions and 0 deletions
|
|
@ -235,6 +235,15 @@ export async function fingerprintFile(filePath: string): Promise<FileFingerprint
|
|||
const s = await stat(filePath)
|
||||
return { dev: s.dev, ino: s.ino, mtimeMs: s.mtimeMs, sizeBytes: s.size }
|
||||
} catch {
|
||||
const colonIdx = filePath.lastIndexOf(':')
|
||||
if (colonIdx > 0) {
|
||||
try {
|
||||
const s = await stat(filePath.slice(0, colonIdx))
|
||||
return { dev: s.dev, ino: s.ino, mtimeMs: s.mtimeMs, sizeBytes: s.size }
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue