MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / db_path_for_project

Function db_path_for_project

src/ui/http_server.c:233–243  ·  view source on GitHub ↗

Build DB path for a project: / .db */

Source from the content-addressed store, hash-verified

231
232/* Build DB path for a project: <cache_dir>/<project>.db */
233static void db_path_for_project(const char *project, char *buf, size_t bufsz) {
234 if (!cbm_validate_project_name(project)) {
235 buf[0] = '\0';
236 return;
237 }
238 const char *dir = cbm_resolve_cache_dir();
239 if (!dir) {
240 dir = cbm_tmpdir();
241 }
242 snprintf(buf, bufsz, "%s/%s.db", dir, project);
243}
244
245/* ── Git remote → GitHub deep-link base (/api/repo-info) ───────── */
246

Callers 6

handle_repo_infoFunction · 0.85
handle_adr_getFunction · 0.85
handle_adr_saveFunction · 0.85
handle_delete_projectFunction · 0.85
handle_project_healthFunction · 0.85
handle_layoutFunction · 0.85

Calls 3

cbm_resolve_cache_dirFunction · 0.85
cbm_tmpdirFunction · 0.85

Tested by

no test coverage detected