Skip to content

Commit 3931857

Browse files
committed
Small fixes for scan rework
- set recursive setting to off if content dir points to a file (can happen when scan menu is opened after a playlist refresh) - fix a crash that can also happen when scan menu is opened after playlist refresh
1 parent 79b6e00 commit 3931857

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

manual_content_scan.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,10 @@ bool manual_content_scan_get_task_config(
12901290
return false;
12911291

12921292
if (!path_is_directory(scan_settings.content_dir))
1293+
{
12931294
scan_settings.scan_single_file = true;
1295+
scan_settings.search_recursively = false;
1296+
}
12941297
else
12951298
scan_settings.scan_single_file = false;
12961299

menu/cbs/menu_cbs_deferred_push.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static int general_push(menu_displaylist_info_t *info,
398398
if (!valid_extensions)
399399
valid_extensions = info->exts;
400400

401-
if (*valid_extensions)
401+
if (valid_extensions && *valid_extensions)
402402
{
403403
CHECK_SIZE(strlen(valid_extensions) + 12);
404404
_len += strlcpy(newstr2 + _len, valid_extensions, size - _len);

0 commit comments

Comments
 (0)