task decompress: Refactor decompress checking code

This commit is contained in:
Sebastien Ronsse 2016-05-05 09:43:52 +10:00
parent b8849a574c
commit b100846ad5

View File

@ -247,7 +247,6 @@ bool rarch_task_push_decompress(
retro_task_callback_t cb,
void *user_data)
{
task_finder_data_t find_data;
char tmp[PATH_MAX_LENGTH];
decompress_state_t *s = NULL;
retro_task_t *t = NULL;
@ -275,10 +274,7 @@ bool rarch_task_push_decompress(
if (!valid_ext || !valid_ext[0])
valid_ext = NULL;
find_data.func = rarch_task_decompress_finder;
find_data.userdata = (void*)source_file;
if (task_queue_ctl(TASK_QUEUE_CTL_FIND, &find_data))
if (rarch_task_check_decompress(source_file))
{
RARCH_LOG("[decompress] File '%s' already being decompressed.\n",
source_file);