From d8fa4e17505525bb26d2a4aa9d7271e5dafe8bde Mon Sep 17 00:00:00 2001 From: Erin Date: Fri, 8 Nov 2024 15:11:14 -0600 Subject: [PATCH] Editing bug in refresh() not looking for .zip files --- src/WombatUpdateWidget.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/WombatUpdateWidget.cpp b/src/WombatUpdateWidget.cpp index 6bb535bb..49fa8d34 100644 --- a/src/WombatUpdateWidget.cpp +++ b/src/WombatUpdateWidget.cpp @@ -89,17 +89,14 @@ void WombatUpdateWidget::refresh() else { // Look at each directory - foreach (const QString &name, WombatUpdateWidget::mountDir.entryList(QDir::NoDotAndDotDot | QDir::Dirs)) + foreach (const QString &file, WombatUpdateWidget::mountDir.entryList(QDir::Files)) { - // Filter out directories that aren't zip files - QDir subDir = WombatUpdateWidget::mountDir; - subDir.cd(name); - - if (!selectedName.contains(".zip", Qt::CaseInsensitive)) + // Filter out files that aren't zip files + if (!file.contains(".zip", Qt::CaseInsensitive)) continue; // Add directory to the list - ui->updateList->addItem(subDir.dirName()); + ui->updateList->addItem(file); } // Unmount USB drive