mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
(Filebrowser) Cleanup to directory_parse
This commit is contained in:
parent
8d8abcbdc5
commit
54ec513e7e
@ -24,19 +24,18 @@ static bool directory_parse(void *data, const char *path)
|
||||
filebrowser_t *filebrowser = (filebrowser_t*)data;
|
||||
|
||||
struct string_list *list = dir_list_new(path, filebrowser->extensions, true);
|
||||
|
||||
if(list == NULL)
|
||||
if(!list)
|
||||
return false;
|
||||
|
||||
dir_list_sort(filebrowser->current_dir.list, true);
|
||||
|
||||
filebrowser->current_dir.ptr = 0;
|
||||
strlcpy(filebrowser->directory_path, path, sizeof(filebrowser->directory_path));
|
||||
|
||||
if(filebrowser->current_dir.list != NULL)
|
||||
if(filebrowser->current_dir.list)
|
||||
dir_list_free(filebrowser->current_dir.list);
|
||||
|
||||
filebrowser->current_dir.list = list;
|
||||
filebrowser->current_dir.ptr = 0;
|
||||
|
||||
dir_list_sort(filebrowser->current_dir.list, true);
|
||||
|
||||
return true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user