GUACAMOLE-94: Merge move from readdir_r to readdir.

This commit is contained in:
James Muehlner 2017-01-29 12:30:24 -08:00
commit 135514a0d2
2 changed files with 3 additions and 13 deletions

View File

@ -595,16 +595,12 @@ const char* guac_rdp_fs_read_dir(guac_rdp_fs* fs, int file_id) {
return NULL; return NULL;
} }
/* Read next entry, stop if error */ /* Read next entry, stop if error or no more entries */
if (readdir_r(file->dir, &(file->__dirent), &result)) if ((result = readdir(file->dir)) == NULL)
return NULL;
/* If no more entries, return NULL */
if (result == NULL)
return NULL; return NULL;
/* Return filename */ /* Return filename */
return file->__dirent.d_name; return result->d_name;
} }

View File

@ -216,12 +216,6 @@ typedef struct guac_rdp_fs_file {
*/ */
DIR* dir; DIR* dir;
/**
* The last read dirent structure. This is used if traversing the contents
* of a directory.
*/
struct dirent __dirent;
/** /**
* The pattern the check directory contents against, if any. * The pattern the check directory contents against, if any.
*/ */