| 24344 | } |
| 24345 | |
| 24346 | static void search_root_fixture_destroy(search_root_fixture_t *fx) { |
| 24347 | /* Unlink the links first so the tree removal never descends through one. */ |
| 24348 | static const char *const links[] = {"alias", "mirror.c", "link.c", "lib"}; |
| 24349 | for (size_t i = 0; i < sizeof(links) / sizeof(links[0]); i++) { |
| 24350 | char path[CBM_SZ_1K]; |
| 24351 | snprintf(path, sizeof(path), "%s/%s", fx->root, links[i]); |
| 24352 | (void)unlink(path); |
| 24353 | } |
| 24354 | (void)th_rmtree(fx->root); |
| 24355 | (void)th_rmtree(fx->outside); |
| 24356 | } |
| 24357 | |
| 24358 | /* File nodes as a stale index holds them: the link targets were ordinary |
| 24359 | * directories and files when they were indexed (discovery itself never |