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

Function ws_tempdir_canonical

tests/test_workspace.c:507–510  ·  view source on GitHub ↗

th_mktempdir hands back one static buffer, so copy at once — and in canonical * form, because the policy compares resolved spellings and /tmp is a link on * macOS. */

Source from the content-addressed store, hash-verified

505 * form, because the policy compares resolved spellings and /tmp is a link on
506 * macOS. */
507static bool ws_tempdir_canonical(const char *prefix, char *out, size_t out_sz) {
508 char *created = th_mktempdir(prefix);
509 return created && cbm_canonical_path(created, out, out_sz) == 1;
510}
511
512static bool ws_join(char *out, size_t out_sz, const char *a, const char *b) {
513 int n = snprintf(out, out_sz, "%s/%s", a, b);

Callers 1

test_workspace.cFile · 0.85

Calls 2

th_mktempdirFunction · 0.85
cbm_canonical_pathFunction · 0.85

Tested by

no test coverage detected