From a32cf52f8f900b9c73eae3cc5008b281e8ac31fa Mon Sep 17 00:00:00 2001 From: Geoff Hutchison Date: Fri, 20 Dec 2024 21:56:23 -0500 Subject: [PATCH] Fix for problem accessing plugin list File ended in a newline, which triggered an over-sensitive test Signed-off-by: Geoff Hutchison --- avogadro/qtplugins/plugindownloader/downloaderwidget.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/avogadro/qtplugins/plugindownloader/downloaderwidget.cpp b/avogadro/qtplugins/plugindownloader/downloaderwidget.cpp index 5391ab2e04..c8d539c5e8 100644 --- a/avogadro/qtplugins/plugindownloader/downloaderwidget.cpp +++ b/avogadro/qtplugins/plugindownloader/downloaderwidget.cpp @@ -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;