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

Function diagnostics_cleanup_outputs

tests/test_diagnostics.c:104–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104static void diagnostics_cleanup_outputs(const diagnostics_paths_t *paths) {
105 char temporary[1100];
106 char rotated[1100];
107 if (snprintf(temporary, sizeof(temporary), "%s.tmp", paths->snapshot) > 0) {
108 (void)cbm_unlink(temporary);
109 }
110 if (snprintf(rotated, sizeof(rotated), "%s.1", paths->trajectory) > 0) {
111 (void)cbm_unlink(rotated);
112 }
113 (void)cbm_unlink(paths->snapshot);
114 (void)cbm_unlink(paths->trajectory);
115 (void)cbm_rmdir(paths->directory);
116}
117
118#ifndef _WIN32
119TEST(diagnostics_rejects_predictable_tmp_symlinks) {

Callers 1

test_diagnostics.cFile · 0.85

Calls 2

cbm_unlinkFunction · 0.85
cbm_rmdirFunction · 0.85

Tested by

no test coverage detected