Skip to content

Commit

Permalink
Fix for problem accessing plugin list
Browse files Browse the repository at this point in the history
File ended in a newline, which triggered an over-sensitive test

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Dec 21, 2024
1 parent 47545da commit a32cf52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions avogadro/qtplugins/plugindownloader/downloaderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ void DownloaderWidget::updateRepoData()
// Reading the data from the response
QByteArray bytes = m_reply->readAll();

// quick checks that it's a valid JSON reply
// it should be a list, so [ ] characters
if (bytes.isEmpty() || bytes[0] != '[' || bytes[bytes.size() - 1] != ']') {
// quick check that it's not empty
if (bytes.isEmpty()) {
QMessageBox::warning(this, tr("Error"),
tr("Error downloading plugin data."));
return;
Expand Down

0 comments on commit a32cf52

Please sign in to comment.