From 5f9e04dad38f73baf402e0ea4871f50c34a0819c Mon Sep 17 00:00:00 2001 From: alex-z Date: Mon, 23 Oct 2023 20:56:53 +0200 Subject: [PATCH] Do not show failure popul for VFS when hydration finished with code 200 or 204. Signed-off-by: alex-z --- src/libsync/vfs/cfapi/hydrationjob.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libsync/vfs/cfapi/hydrationjob.cpp b/src/libsync/vfs/cfapi/hydrationjob.cpp index 58e30c22b5710..a90b2a07975a3 100644 --- a/src/libsync/vfs/cfapi/hydrationjob.cpp +++ b/src/libsync/vfs/cfapi/hydrationjob.cpp @@ -351,9 +351,15 @@ void OCC::HydrationJob::onGetFinished() { _errorCode = _job->reply()->error(); _statusCode = _job->reply()->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); - _errorString = _job->reply()->errorString(); - - qCInfo(lcHydration) << "GETFileJob finished" << _requestId << _folderPath << _errorCode << _statusCode << _errorString; + if (_errorCode != 0 || (_statusCode != 200 && _statusCode != 204)) { + _errorString = _job->reply()->errorString(); + } + + if (!_errorString.isEmpty()) { + qCInfo(lcHydration) << "GETFileJob finished" << _requestId << _folderPath << _errorCode << _statusCode << _errorString; + } else { + qCInfo(lcHydration) << "GETFileJob finished" << _requestId << _folderPath; + } // GETFileJob deletes itself after this signal was handled _job = nullptr; if (_isCancelled) {