mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
simplify code
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
parent
7091b7f889
commit
b028024b08
1 changed files with 6 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue