Drop a staged temp file: through the pinned parent for a followed link, * by name otherwise. */
| 891 | /* Drop a staged temp file: through the pinned parent for a followed link, |
| 892 | * by name otherwise. */ |
| 893 | static void yaml_discard_temp(const cbm_config_edit_target_t *target, const char *temp_path) { |
| 894 | if (target->status == CBM_CONFIG_EDIT_PATH_FOLLOWED) { |
| 895 | (void)cbm_config_edit_target_unlink(target, yaml_temp_name(temp_path)); |
| 896 | } else { |
| 897 | (void)cbm_unlink(temp_path); |
| 898 | } |
| 899 | } |
| 900 | |
| 901 | /* For a followed link (#1954) the temp file is created with openat() beside |
| 902 | * the target and published with renameat() on the pinned parent, so the link |
no test coverage detected