Drop a staged temp file: through the pinned parent for a followed link, * by name otherwise. */
| 611 | /* Drop a staged temp file: through the pinned parent for a followed link, |
| 612 | * by name otherwise. */ |
| 613 | static void text_discard_temp(const cbm_config_edit_target_t *target, const char *temp_path) { |
| 614 | if (target->status == CBM_CONFIG_EDIT_PATH_FOLLOWED) { |
| 615 | (void)cbm_config_edit_target_unlink(target, text_temp_name(temp_path)); |
| 616 | } else { |
| 617 | (void)cbm_unlink(temp_path); |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | /* For a followed link (#1954) the temp file is created with openat() beside |
| 622 | * the target and published with renameat() on the pinned parent, so the link |
no test coverage detected