Skip to content

Commit

Permalink
Editing bug in refresh() not looking for .zip files
Browse files Browse the repository at this point in the history
  • Loading branch information
erinharrington-12 committed Nov 8, 2024
1 parent 5b79b3c commit d8fa4e1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/WombatUpdateWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8fa4e1

Please sign in to comment.