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

Function cli_checksum_manifest_path

tests/test_cli.c:11952–11972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11950}
11951
11952static bool cli_checksum_manifest_path(char *path, size_t path_size) {
11953 int written = snprintf(path, path_size, "%s/cbm-checksum-XXXXXX", cbm_tmpdir());
11954 if (written <= 0 || (size_t)written >= path_size) {
11955 return false;
11956 }
11957 int descriptor = cbm_mkstemp(path);
11958 if (descriptor < 0) {
11959 return false;
11960 }
11961 FILE *file = fdopen(descriptor, "wb");
11962 if (!file) {
11963#ifdef _WIN32
11964 (void)_close(descriptor);
11965#else
11966 (void)close(descriptor);
11967#endif
11968 (void)cbm_unlink(path);
11969 return false;
11970 }
11971 return fclose(file) == 0;
11972}
11973
11974TEST(cli_checksum_manifest_requires_exact_filename_and_accepts_star) {
11975 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