mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 11:41:35 -10:00
scan: report a vanished folder on a database scan too
A folder of known kind is no longer stat'd when the scan is set up, so the worker is where a missing folder is found. A plain scan says so, but a database scan ended with no message on screen, and a command line scan blamed the configuration. Give it the plain scan's message. Refuse the other half of the same mismatch: a file that has become a folder was walked as a folder while the scan kept treating it as a file. The task already holds the content kind in its config, so do not ask for it again on the main thread.
This commit is contained in:
1 parent
0f72bd97d5
commit
31215d5838
2 files changed
+11
-2
No files matched your search
@@ -2284,6 +2284,10 @@ bool manual_content_scan_content_list_iter_new(
|
||||
|
||||
if (path_is_directory(task_config->content_dir))
|
||||
{
|
||||
/* An expected file that has since become a folder */
|
||||
if (task_config->content_is_file)
|
||||
return false;
|
||||
|
||||
if (!(*list = string_list_new()))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -5420,7 +5420,13 @@ static bool manual_scan_begin_setup(retro_task_t *task,
|
||||
manual_scan->content_list);
|
||||
|
||||
if (!manual_scan->content_iter)
|
||||
{
|
||||
const char *_msg = msg_hash_to_str(MSG_MANUAL_CONTENT_SCAN_INVALID_CONTENT);
|
||||
runloop_msg_queue_push(_msg, strlen(_msg), 1, 100, true, NULL,
|
||||
MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
manual_scan->fail_msg = _msg;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6872,8 +6878,7 @@ static bool task_manual_content_scan_push(
|
||||
if (manual_scan->task_config->db_selection == MANUAL_CONTENT_SCAN_SELECT_DB_AUTO_FIRST_MATCH)
|
||||
manual_scan->flags |= DB_HANDLE_FLAG_USE_FIRST_MATCH_ONLY;
|
||||
|
||||
if (manual_content_scan_content_stat(manual_scan->task_config->content_dir)
|
||||
& RETRO_VFS_STAT_IS_DIRECTORY)
|
||||
if (!manual_scan->task_config->content_is_file)
|
||||
manual_scan->flags |= DB_HANDLE_FLAG_IS_DIRECTORY;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user