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

Function jl_discard_temp

src/cli/config_json_like.c:1633–1639  ·  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

1631/* Drop a staged temp file: through the pinned parent for a followed link,
1632 * by name otherwise. */
1633static void jl_discard_temp(const cbm_config_edit_target_t *target, const char *temp_path) {
1634 if (target->status == CBM_CONFIG_EDIT_PATH_FOLLOWED) {
1635 (void)cbm_config_edit_target_unlink(target, jl_temp_name(temp_path));
1636 } else {
1637 (void)cbm_unlink(temp_path);
1638 }
1639}
1640
1641/* For a followed link (#1954) the temp file is created with openat() beside
1642 * the target and published with renameat() on the pinned parent, so the link

Callers 1

jl_write_atomic_atFunction · 0.85

Calls 3

jl_temp_nameFunction · 0.85
cbm_unlinkFunction · 0.85

Tested by

no test coverage detected