From e36d269df3642de010c51cc1e2502c14b7c2387a Mon Sep 17 00:00:00 2001 From: ma-moon <100507036+ma-moon@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:53:23 +0800 Subject: [PATCH] Fix: Respect filter_inside_archives in drag-drop playlist entries (#18983) --- ui/drivers/ui_qt_widgets.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/ui/drivers/ui_qt_widgets.cpp b/ui/drivers/ui_qt_widgets.cpp index 5e53ef1c5949..0313ad8e31c2 100644 --- a/ui/drivers/ui_qt_widgets.cpp +++ b/ui/drivers/ui_qt_widgets.cpp @@ -7508,13 +7508,25 @@ bool MainWindow::addDirectoryFilesToList(QProgressDialog *dialog, * Don't just extend this to add all files * in a ZIP, because we might hit something like * MAME/FBA where only the archives themselves - * are valid content. */ - pathArray = (QString(pathData) - + QString("#") - + archive_list->elems[0].data).toUtf8(); - pathData = pathArray.constData(); + /* Only append inner file reference if filter inside archives is enabled */ + if (playlistDialog->filterInArchive()) + { + pathArray = (QString(pathData) + + QString("#") + + archive_list->elems[0].data).toUtf8(); + pathData = pathArray.constData(); + } if (!extensions.isEmpty() && playlistDialog->filterInArchive()) + { + /* If the user chose to filter extensions + * inside archives, and this particular file + * inside the archive + * doesn't have one of the chosen extensions, + * then we skip it. */ + if (extensions.contains(QFileInfo(pathData).suffix())) + add = true; + } { /* If the user chose to filter extensions * inside archives, and this particular file