mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(task_database.c) Small cleanup
This commit is contained in:
parent
617e232850
commit
02d429b2dd
@ -40,15 +40,12 @@ static int zlib_compare_crc32(const char *name, const char *valid_exts,
|
|||||||
static int database_info_iterate_rdl_write(
|
static int database_info_iterate_rdl_write(
|
||||||
database_info_handle_t *db, const char *name)
|
database_info_handle_t *db, const char *name)
|
||||||
{
|
{
|
||||||
|
int ret = 0;
|
||||||
char parent_dir[PATH_MAX_LENGTH];
|
char parent_dir[PATH_MAX_LENGTH];
|
||||||
bool to_continue = (db->list_ptr < db->list->size);
|
bool to_continue = (db->list_ptr < db->list->size);
|
||||||
|
|
||||||
if (!to_continue)
|
if (!to_continue)
|
||||||
{
|
|
||||||
rarch_main_msg_queue_push("Scanning of directory finished.\n", 1, 180, true);
|
|
||||||
db->status = DATABASE_STATUS_FREE;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
path_parent_dir(parent_dir);
|
path_parent_dir(parent_dir);
|
||||||
|
|
||||||
@ -72,9 +69,7 @@ static int database_info_iterate_rdl_write(
|
|||||||
|
|
||||||
(void)target_crc;
|
(void)target_crc;
|
||||||
|
|
||||||
if (read_from != 1)
|
if (read_from != 1 || ret <= 0)
|
||||||
return 0;
|
|
||||||
if (ret <= 0)
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
snprintf(msg, sizeof(msg), "%zu/%zu: Scanning %s...\n",
|
snprintf(msg, sizeof(msg), "%zu/%zu: Scanning %s...\n",
|
||||||
@ -115,7 +110,11 @@ static int database_info_iterate(database_info_handle_t *db)
|
|||||||
break;
|
break;
|
||||||
case DATABASE_TYPE_RDL_WRITE:
|
case DATABASE_TYPE_RDL_WRITE:
|
||||||
if (database_info_iterate_rdl_write(db, name) != 0)
|
if (database_info_iterate_rdl_write(db, name) != 0)
|
||||||
|
{
|
||||||
|
rarch_main_msg_queue_push("Scanning of directory finished.\n", 0, 180, true);
|
||||||
|
db->status = DATABASE_STATUS_FREE;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user