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

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

Source from the content-addressed store, hash-verified

179
180/* Build DB path for a project: <cache_dir>/<project>.db */
181static void db_path_for_project(const char *project, char *buf, size_t bufsz) {
182 if (!cbm_validate_project_name(project)) {
183 buf[0] = '\0';
184 return;
185 }
186 const char *dir = cbm_resolve_cache_dir();
187 if (!dir) {
188 dir = cbm_tmpdir();
189 }
190 snprintf(buf, bufsz, "%s/%s.db", dir, project);
191}
192
193/* ── Git remote → GitHub deep-link base (/api/repo-info) ───────── */
194

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