Skip to content

Commit e36d269

Browse files
authored
Fix: Respect filter_inside_archives in drag-drop playlist entries (#18983)
1 parent 5f23e85 commit e36d269

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

ui/drivers/ui_qt_widgets.cpp

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7508,13 +7508,25 @@ bool MainWindow::addDirectoryFilesToList(QProgressDialog *dialog,
75087508
* Don't just extend this to add all files
75097509
* in a ZIP, because we might hit something like
75107510
* MAME/FBA where only the archives themselves
7511-
* are valid content. */
7512-
pathArray = (QString(pathData)
7513-
+ QString("#")
7514-
+ archive_list->elems[0].data).toUtf8();
7515-
pathData = pathArray.constData();
7511+
/* Only append inner file reference if filter inside archives is enabled */
7512+
if (playlistDialog->filterInArchive())
7513+
{
7514+
pathArray = (QString(pathData)
7515+
+ QString("#")
7516+
+ archive_list->elems[0].data).toUtf8();
7517+
pathData = pathArray.constData();
7518+
}
75167519

75177520
if (!extensions.isEmpty() && playlistDialog->filterInArchive())
7521+
{
7522+
/* If the user chose to filter extensions
7523+
* inside archives, and this particular file
7524+
* inside the archive
7525+
* doesn't have one of the chosen extensions,
7526+
* then we skip it. */
7527+
if (extensions.contains(QFileInfo(pathData).suffix()))
7528+
add = true;
7529+
}
75187530
{
75197531
/* If the user chose to filter extensions
75207532
* inside archives, and this particular file

0 commit comments

Comments
 (0)