mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-09-14 14:47:30 -04:00
Concurrent Libation instances against one LibationFiles folder raced on the SQLite database, Lucene search index, and log file, and the startup routine unconditionally deleted LibationContext.db-wal/-shm - discarding committed transactions when a prior run died abruptly (issue #1931). - Add SingleInstance (named mutex keyed on the LibationFiles folder). Wire it into the Avalonia and WinForms startup so a second launch shows a message and exits before any database access, and holds the lock for the process lifetime. - DeleteOpenSqliteFiles now skips cleanup when the DB is held by another process and preserves a non-empty (unrecovered) WAL so SQLite can recover it on open. Also compare AccountId case-insensitively in AccountsSettings.GetAccount so a capitalization difference no longer causes spurious 'No account found' errors. Co-authored-by: rmcrackan <rmcrackan@gmail.com>