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

Function cli_checksum_manifest_path

tests/test_cli.c:11860–11880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11858}
11859
11860static bool cli_checksum_manifest_path(char *path, size_t path_size) {
11861 int written = snprintf(path, path_size, "%s/cbm-checksum-XXXXXX", cbm_tmpdir());
11862 if (written <= 0 || (size_t)written >= path_size) {
11863 return false;
11864 }
11865 int descriptor = cbm_mkstemp(path);
11866 if (descriptor < 0) {
11867 return false;
11868 }
11869 FILE *file = fdopen(descriptor, "wb");
11870 if (!file) {
11871#ifdef _WIN32
11872 (void)_close(descriptor);
11873#else
11874 (void)close(descriptor);
11875#endif
11876 (void)cbm_unlink(path);
11877 return false;
11878 }
11879 return fclose(file) == 0;
11880}
11881
11882TEST(cli_checksum_manifest_requires_exact_filename_and_accepts_star) {
11883 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