simplify code

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2023-01-24 22:24:30 +01:00
parent 7091b7f889
commit b028024b08
No known key found for this signature in database
GPG key ID: 7D0F74F05C22F553

View file

@ -158,15 +158,13 @@ void CaseClashConflictSolver::onCheckIfAllowedToRenameComplete(const QVariantMap
emit errorStringChanged();
return;
} else if (reply) {
if (reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != CONTENT_NOT_FOUND_ERROR) {
_allowedToRename = false;
emit allowedToRenameChanged();
_errorString = tr("Failed to fetch permissions with error %1").arg(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt());
emit errorStringChanged();
} else if (reply && reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() != CONTENT_NOT_FOUND_ERROR) {
_allowedToRename = false;
emit allowedToRenameChanged();
_errorString = tr("Failed to fetch permissions with error %1").arg(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt());
emit errorStringChanged();
return;
}
return;
}
_allowedToRename = true;