| 102 | } |
| 103 | |
| 104 | static void diagnostics_cleanup_outputs(const diagnostics_paths_t *paths) { |
| 105 | char temporary[1100]; |
| 106 | char rotated[1100]; |
| 107 | if (snprintf(temporary, sizeof(temporary), "%s.tmp", paths->snapshot) > 0) { |
| 108 | (void)cbm_unlink(temporary); |
| 109 | } |
| 110 | if (snprintf(rotated, sizeof(rotated), "%s.1", paths->trajectory) > 0) { |
| 111 | (void)cbm_unlink(rotated); |
| 112 | } |
| 113 | (void)cbm_unlink(paths->snapshot); |
| 114 | (void)cbm_unlink(paths->trajectory); |
| 115 | (void)cbm_rmdir(paths->directory); |
| 116 | } |
| 117 | |
| 118 | #ifndef _WIN32 |
| 119 | TEST(diagnostics_rejects_predictable_tmp_symlinks) { |
no test coverage detected