GUACAMOLE-94: Merge move from readdir_r to readdir.
This commit is contained in:
commit
135514a0d2
@ -595,16 +595,12 @@ const char* guac_rdp_fs_read_dir(guac_rdp_fs* fs, int file_id) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Read next entry, stop if error */
|
||||
if (readdir_r(file->dir, &(file->__dirent), &result))
|
||||
return NULL;
|
||||
|
||||
/* If no more entries, return NULL */
|
||||
if (result == NULL)
|
||||
/* Read next entry, stop if error or no more entries */
|
||||
if ((result = readdir(file->dir)) == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Return filename */
|
||||
return file->__dirent.d_name;
|
||||
return result->d_name;
|
||||
|
||||
}
|
||||
|
||||
|
@ -216,12 +216,6 @@ typedef struct guac_rdp_fs_file {
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user