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

Function cleanup_backup_artifacts

tests/repro/repro_issue557.c:171–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171static void cleanup_backup_artifacts(const char *cache_dir) {
172 cbm_dir_t *dir = cbm_opendir(cache_dir);
173 if (!dir) {
174 return;
175 }
176
177 cbm_dirent_t *entry;
178 while ((entry = cbm_readdir(dir)) != NULL) {
179 if (!is_backup_artifact_name(entry->name)) {
180 continue;
181 }
182 char path[800];
183 snprintf(path, sizeof(path), "%s/%s", cache_dir, entry->name);
184 cbm_unlink(path);
185 }
186 cbm_closedir(dir);
187}
188
189/* ── Test ─────────────────────────────────────────────────────────────
190 *

Callers 1

repro_issue557.cFile · 0.85

Calls 5

cbm_opendirFunction · 0.85
cbm_readdirFunction · 0.85
is_backup_artifact_nameFunction · 0.85
cbm_unlinkFunction · 0.85
cbm_closedirFunction · 0.85

Tested by

no test coverage detected