Fix windows test failures

This commit is contained in:
thePR0M3TH3AN
2025-05-24 23:22:50 -04:00
parent 24c7952c79
commit 0f33293fe1
3 changed files with 5 additions and 6 deletions

View File

@@ -188,7 +188,8 @@ pub fn ensure_tag_path(conn: &Connection, path: &str) -> Result<i64> {
}
pub fn file_id(conn: &Connection, path: &str) -> Result<i64> {
conn.query_row("SELECT id FROM files WHERE path = ?1", [path], |r| r.get(0))
let path = to_db_path(path);
conn.query_row("SELECT id FROM files WHERE path = ?1", [path.clone()], |r| r.get(0))
.map_err(|_| anyhow::anyhow!("file not indexed: {}", path))
}