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:222–232  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

220
221/* Build DB path for a project: <cache_dir>/<project>.db */
222static void db_path_for_project(const char *project, char *buf, size_t bufsz) {
223 if (!cbm_validate_project_name(project)) {
224 buf[0] = '\0';
225 return;
226 }
227 const char *dir = cbm_resolve_cache_dir();
228 if (!dir) {
229 dir = cbm_tmpdir();
230 }
231 snprintf(buf, bufsz, "%s/%s.db", dir, project);
232}
233
234/* ── Git remote → GitHub deep-link base (/api/repo-info) ───────── */
235

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