Revert "readdir_r use in tagcache.check_dir, ft_load"

This reverts commit 0c737d3b2e.

Reason for revert: Not really a concern as open_stream returns an independent buffer since g#566

Change-Id: Idbd2f4a7cc2ea6362b7714629469eeb7b3d19b3b
This commit is contained in:
William Wilgus 2024-05-02 13:38:32 -04:00
parent 0c737d3b2e
commit efcea66280
7 changed files with 24 additions and 129 deletions

View file

@ -4863,8 +4863,8 @@ static int free_search_roots(struct search_roots_ll * start)
static bool check_dir(const char *dirname, int add_files)
{
static struct dirent direntry; /* function is recursive, static uses less stack */
int success = false;
DIR *dir = opendir(dirname);
if (!dir)
{
@ -4883,9 +4883,7 @@ static bool check_dir(const char *dirname, int add_files)
/* Recursively scan the dir. */
while (!check_event_queue())
{
struct dirent *entry;
readdir_r(dir, &direntry, &entry);
struct dirent *entry = readdir(dir);
if (entry == NULL)
{
success = true;