hive-c0re: pass build_logs the parent dir, not the broker.sqlite file

Every other Coordinator opener takes the broker.sqlite path and
derives its parent internally; BuildLogs alone wants a directory.
Passing the file path tripped create_dir_all on an existing file
(File exists os error 17) and blocked c0re boot.
This commit is contained in:
müde 2026-05-31 20:53:35 +02:00
commit 7cc2690717
2 changed files with 10 additions and 5 deletions

View file

@ -131,10 +131,10 @@ pub struct BuildLogs {
}
impl BuildLogs {
pub fn open(db_path: &Path) -> Result<Self> {
std::fs::create_dir_all(db_path)
.with_context(|| format!("create build_logs db parent {}", db_path.display()))?;
let path = db_path.join("build_logs.sqlite");
pub fn open(db_dir: &Path) -> Result<Self> {
std::fs::create_dir_all(db_dir)
.with_context(|| format!("create build_logs db parent {}", db_dir.display()))?;
let path = db_dir.join("build_logs.sqlite");
let conn = Connection::open(&path)
.with_context(|| format!("open build_logs db {}", path.display()))?;
conn.execute_batch(SCHEMA)