mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-15 18:21:35 +03:00
Poll URL: Use trimmed() on response
This commit is contained in:
parent
2aef6a2174
commit
7ec0c52439
1 changed files with 3 additions and 1 deletions
|
@ -120,7 +120,9 @@ bool PollJob::finished()
|
|||
}
|
||||
|
||||
bool ok = false;
|
||||
QVariantMap status = QtJson::parse(QString::fromUtf8(reply()->readAll()), ok).toMap();
|
||||
QByteArray jsonData = reply()->readAll().trimmed();
|
||||
qDebug() << Q_FUNC_INFO << ">" << jsonData << "<";
|
||||
QVariantMap status = QtJson::parse(QString::fromUtf8(jsonData), ok).toMap();
|
||||
if (!ok || status.isEmpty()) {
|
||||
_item._errorString = tr("Invalid json reply from the poll URL");
|
||||
_item._status = SyncFileItem::NormalError;
|
||||
|
|
Loading…
Reference in a new issue