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

Function cli_checksum_manifest_path

tests/test_cli.c:12315–12335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12313}
12314
12315static bool cli_checksum_manifest_path(char *path, size_t path_size) {
12316 int written = snprintf(path, path_size, "%s/cbm-checksum-XXXXXX", cbm_tmpdir());
12317 if (written <= 0 || (size_t)written >= path_size) {
12318 return false;
12319 }
12320 int descriptor = cbm_mkstemp(path);
12321 if (descriptor < 0) {
12322 return false;
12323 }
12324 FILE *file = fdopen(descriptor, "wb");
12325 if (!file) {
12326#ifdef _WIN32
12327 (void)_close(descriptor);
12328#else
12329 (void)close(descriptor);
12330#endif
12331 (void)cbm_unlink(path);
12332 return false;
12333 }
12334 return fclose(file) == 0;
12335}
12336
12337TEST(cli_checksum_manifest_requires_exact_filename_and_accepts_star) {
12338 static const char lower_digest[] =

Callers 1

test_cli.cFile · 0.85

Calls 3

cbm_tmpdirFunction · 0.85
cbm_mkstempFunction · 0.85
cbm_unlinkFunction · 0.85

Tested by

no test coverage detected