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

Function toml_discard_temp

src/cli/config_toml_edit.c:640–646  ·  view source on GitHub ↗

Drop a staged temp file: through the pinned parent for a followed link, * by name otherwise. */

Source from the content-addressed store, hash-verified

638/* Drop a staged temp file: through the pinned parent for a followed link,
639 * by name otherwise. */
640static void toml_discard_temp(const cbm_config_edit_target_t *target, const char *temp_path) {
641 if (target->status == CBM_CONFIG_EDIT_PATH_FOLLOWED) {
642 (void)cbm_config_edit_target_unlink(target, toml_temp_name(temp_path));
643 } else {
644 (void)cbm_unlink(temp_path);
645 }
646}
647
648/* For a followed link (#1954) the temp file is created with openat() beside
649 * the target and published with renameat() on the pinned parent, so the link

Callers 1

toml_write_atomic_atFunction · 0.85

Calls 3

toml_temp_nameFunction · 0.85
cbm_unlinkFunction · 0.85

Tested by

no test coverage detected