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

Function cli_checksum_manifest_path

tests/test_cli.c:17468–17488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17466}
17467
17468static bool cli_checksum_manifest_path(char *path, size_t path_size) {
17469 int written = snprintf(path, path_size, "%s/cbm-checksum-XXXXXX", cbm_tmpdir());
17470 if (written <= 0 || (size_t)written >= path_size) {
17471 return false;
17472 }
17473 int descriptor = cbm_mkstemp(path);
17474 if (descriptor < 0) {
17475 return false;
17476 }
17477 FILE *file = fdopen(descriptor, "wb");
17478 if (!file) {
17479#ifdef _WIN32
17480 (void)_close(descriptor);
17481#else
17482 (void)close(descriptor);
17483#endif
17484 (void)cbm_unlink(path);
17485 return false;
17486 }
17487 return fclose(file) == 0;
17488}
17489
17490TEST(cli_checksum_manifest_requires_exact_filename_and_accepts_star) {
17491 static const char lower_digest[] =

Callers 1

test_cli.cFile · 0.85

Calls 4

cbm_tmpdirFunction · 0.85
cbm_mkstempFunction · 0.85
cbm_unlinkFunction · 0.85
closeFunction · 0.50

Tested by

no test coverage detected